Skip to content

Commit f90f5ce

Browse files
authored
Merge pull request #2208 from seefs001/fix/get-channel-key
fix GetChannelKey AdminAuth -> RootAuth
2 parents af0f542 + e2d8809 commit f90f5ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router/api-router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ func SetApiRouter(router *gin.Engine) {
126126
{
127127
ratioSyncRoute.GET("/channels", controller.GetSyncableChannels)
128128
ratioSyncRoute.POST("/fetch", controller.FetchUpstreamRatios)
129+
ratioSyncRoute.POST("/:id/key", middleware.CriticalRateLimit(), middleware.DisableCache(), middleware.SecureVerificationRequired(), controller.GetChannelKey)
129130
}
130131
channelRoute := apiRouter.Group("/channel")
131132
channelRoute.Use(middleware.AdminAuth())
@@ -135,7 +136,6 @@ func SetApiRouter(router *gin.Engine) {
135136
channelRoute.GET("/models", controller.ChannelListModels)
136137
channelRoute.GET("/models_enabled", controller.EnabledListModels)
137138
channelRoute.GET("/:id", controller.GetChannel)
138-
channelRoute.POST("/:id/key", middleware.CriticalRateLimit(), middleware.DisableCache(), middleware.SecureVerificationRequired(), controller.GetChannelKey)
139139
channelRoute.GET("/test", controller.TestAllChannels)
140140
channelRoute.GET("/test/:id", controller.TestChannel)
141141
channelRoute.GET("/update_balance", controller.UpdateAllChannelsBalance)

0 commit comments

Comments
 (0)