fix GetChannelKey AdminAuth -> RootAuth
This commit is contained in:
parent
31d0e6973c
commit
5c971b1dff
@ -126,7 +126,6 @@ func SetApiRouter(router *gin.Engine) {
|
|||||||
{
|
{
|
||||||
ratioSyncRoute.GET("/channels", controller.GetSyncableChannels)
|
ratioSyncRoute.GET("/channels", controller.GetSyncableChannels)
|
||||||
ratioSyncRoute.POST("/fetch", controller.FetchUpstreamRatios)
|
ratioSyncRoute.POST("/fetch", controller.FetchUpstreamRatios)
|
||||||
ratioSyncRoute.POST("/:id/key", middleware.CriticalRateLimit(), middleware.DisableCache(), middleware.SecureVerificationRequired(), controller.GetChannelKey)
|
|
||||||
}
|
}
|
||||||
channelRoute := apiRouter.Group("/channel")
|
channelRoute := apiRouter.Group("/channel")
|
||||||
channelRoute.Use(middleware.AdminAuth())
|
channelRoute.Use(middleware.AdminAuth())
|
||||||
@ -136,6 +135,7 @@ func SetApiRouter(router *gin.Engine) {
|
|||||||
channelRoute.GET("/models", controller.ChannelListModels)
|
channelRoute.GET("/models", controller.ChannelListModels)
|
||||||
channelRoute.GET("/models_enabled", controller.EnabledListModels)
|
channelRoute.GET("/models_enabled", controller.EnabledListModels)
|
||||||
channelRoute.GET("/:id", controller.GetChannel)
|
channelRoute.GET("/:id", controller.GetChannel)
|
||||||
|
channelRoute.POST("/:id/key", middleware.RootAuth(), middleware.CriticalRateLimit(), middleware.DisableCache(), middleware.SecureVerificationRequired(), controller.GetChannelKey)
|
||||||
channelRoute.GET("/test", controller.TestAllChannels)
|
channelRoute.GET("/test", controller.TestAllChannels)
|
||||||
channelRoute.GET("/test/:id", controller.TestChannel)
|
channelRoute.GET("/test/:id", controller.TestChannel)
|
||||||
channelRoute.GET("/update_balance", controller.UpdateAllChannelsBalance)
|
channelRoute.GET("/update_balance", controller.UpdateAllChannelsBalance)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user