Browse Source

fix(self-check): ws 403 if not install

Jacky 1 month ago
parent
commit
0506098647
1 changed files with 4 additions and 3 deletions
  1. 4 3
      api/system/router.go

+ 4 - 3
api/system/router.go

@@ -28,8 +28,10 @@ func InitPrivateRouter(r *gin.RouterGroup) {
 }
 
 func InitSelfCheckRouter(r *gin.RouterGroup) {
-	r.GET("self_check", authIfInstalled, SelfCheck)
-	r.POST("self_check/:name/fix", authIfInstalled, SelfCheckFix)
+	g := r.Group("self_check")
+	g.GET("", authIfInstalled, SelfCheck)
+	g.POST("/:name/fix", authIfInstalled, SelfCheckFix)
+	g.GET("websocket", authIfInstalled, CheckWebSocket)
 }
 
 func InitBackupRestoreRouter(r *gin.RouterGroup) {
@@ -41,5 +43,4 @@ func InitBackupRestoreRouter(r *gin.RouterGroup) {
 
 func InitWebSocketRouter(r *gin.RouterGroup) {
 	r.GET("upgrade/perform", PerformCoreUpgrade)
-	r.GET("self_check/websocket", CheckWebSocket)
 }