Refactor: migrate discordbot
All checks were successful
All checks were successful
This commit is contained in:
@@ -116,8 +116,16 @@ var serveCmd = &cobra.Command{
|
||||
|
||||
authGroup := backend.NewGroup("/auth")
|
||||
authGroup.POST("/login", auths.PostLogin)
|
||||
authGroup.POST("/gen-login-url",
|
||||
midHandlers.CheckPresharedKey(auths.PostGenLoginUrl))
|
||||
|
||||
botGroup := backend.NewGroup("/bot").
|
||||
Use(midHandlers.CheckPresharedKey)
|
||||
|
||||
botApiGroup := botGroup.NewGroup("/api")
|
||||
botApiGroup.GET("/aliases", apis.GetAliases)
|
||||
botApiGroup.GET("/images", apis.GetImages)
|
||||
|
||||
botAuthGroup := botGroup.NewGroup("/auth")
|
||||
botAuthGroup.POST("/gen-login-url", auths.PostGenLoginUrl)
|
||||
|
||||
imgGroup := backend.NewGroup("/img")
|
||||
imgGroup.GET("/:filename", imgs.Get)
|
||||
|
||||
Reference in New Issue
Block a user