add setting api (#461)

This commit is contained in:
UUBulb
2024-10-27 13:10:07 +08:00
committed by GitHub
parent 68d7e16773
commit b4edb4cc95
8 changed files with 143 additions and 90 deletions

View File

@@ -55,6 +55,8 @@ func routers(r *gin.Engine) {
optionalAuth.GET("/ws/server", commonHandler(serverStream))
optionalAuth.GET("/server-group", commonHandler(listServerGroup))
optionalAuth.GET("/setting", commonHandler(listConfig))
auth := api.Group("", authMiddleware.MiddlewareFunc())
auth.GET("/refresh_token", authMiddleware.RefreshHandler)
@@ -114,6 +116,8 @@ func routers(r *gin.Engine) {
auth.PATCH("/nat/:id", commonHandler(updateNAT))
auth.POST("/batch-delete/nat", commonHandler(batchDeleteNAT))
auth.PATCH("/setting", commonHandler(updateConfig))
r.NoRoute(fallbackToFrontend)
}