Refactor API handlers and proxy logic
Some checks failed
goreleaser / goreleaser (push) Has been cancelled
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:
@@ -81,7 +81,7 @@ func (s *Server) setupRoutes() {
|
||||
},
|
||||
})
|
||||
})
|
||||
s.engine.POST("/v1internal:method", s.handlers.Internal)
|
||||
s.engine.POST("/v1internal:method", s.handlers.CLIHandler)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user