Refactor API handlers and proxy logic
Some checks failed
goreleaser / goreleaser (push) Has been cancelled

- Centralized `getClient` logic into a dedicated function to reduce redundancy.
- Moved proxy initialization to a new utility function `SetProxy` in `internal/util/proxy.go`.
- Replaced `Internal` handler with `CLIHandler` in `server.go` for improved clarity and consistency.
- Removed unused functions and redundant HTTP client setup across the codebase for better maintainability.
This commit is contained in:
Luis Pater
2025-07-10 17:45:28 +08:00
parent d880d1a1ea
commit ef68a97526
5 changed files with 323 additions and 397 deletions

View File

@@ -81,7 +81,7 @@ func (s *Server) setupRoutes() {
},
})
})
s.engine.POST("/v1internal:method", s.handlers.Internal)
s.engine.POST("/v1internal:method", s.handlers.CLIHandler)
}