mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-12 19:33:41 +08:00
fix: model token creation issue
This commit is contained in:
@@ -62,11 +62,13 @@ func SetApiRouter(router *gin.Engine) {
|
||||
optionRoute.PUT("/", controller.UpdateOption)
|
||||
}
|
||||
channelRoute := apiRouter.Group("/channel")
|
||||
|
||||
channelRoute.Use(middleware.UserAuth()).GET("/models", controller.ListModels)
|
||||
|
||||
channelRoute.Use(middleware.AdminAuth())
|
||||
{
|
||||
channelRoute.GET("/", controller.GetAllChannels)
|
||||
channelRoute.GET("/search", controller.SearchChannels)
|
||||
channelRoute.GET("/models", controller.ListModels)
|
||||
channelRoute.GET("/:id", controller.GetChannel)
|
||||
channelRoute.GET("/test", controller.TestAllChannels)
|
||||
channelRoute.GET("/test/:id", controller.TestChannel)
|
||||
@@ -76,6 +78,7 @@ func SetApiRouter(router *gin.Engine) {
|
||||
channelRoute.PUT("/", controller.UpdateChannel)
|
||||
channelRoute.DELETE("/:id", controller.DeleteChannel)
|
||||
}
|
||||
|
||||
tokenRoute := apiRouter.Group("/token")
|
||||
tokenRoute.Use(middleware.UserAuth())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user