mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-20 15:13:44 +08:00
fix: channel listing
This commit is contained in:
@@ -65,7 +65,9 @@ func SetApiRouter(router *gin.Engine) {
|
||||
{
|
||||
channelRoute.GET("/", controller.GetAllChannels)
|
||||
channelRoute.GET("/search", controller.SearchChannels)
|
||||
channelRoute.GET("/models", controller.ListModels)
|
||||
channelRoute.GET("/models", func(c *gin.Context) {
|
||||
controller.ListModels(c, true)
|
||||
})
|
||||
channelRoute.GET("/:id", controller.GetChannel)
|
||||
channelRoute.GET("/test", controller.TestAllChannels)
|
||||
channelRoute.GET("/test/:id", controller.TestChannel)
|
||||
|
||||
@@ -12,7 +12,9 @@ func SetRelayRouter(router *gin.Engine) {
|
||||
modelsRouter := router.Group("/v1/models")
|
||||
modelsRouter.Use(middleware.TokenAuth())
|
||||
{
|
||||
modelsRouter.GET("/", controller.ListModels)
|
||||
modelsRouter.GET("/", func(c *gin.Context) {
|
||||
controller.ListModels(c, false)
|
||||
})
|
||||
modelsRouter.GET("/:model", controller.RetrieveModel)
|
||||
}
|
||||
relayV1Router := router.Group("/v1")
|
||||
|
||||
Reference in New Issue
Block a user