From 05060986475caaf0264219a7b1400b7135254cb7 Mon Sep 17 00:00:00 2001 From: Jacky Date: Sun, 4 May 2025 01:12:42 +0000 Subject: [PATCH] fix(self-check): ws 403 if not install --- api/system/router.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/system/router.go b/api/system/router.go index 0abdc16f..91c79a68 100644 --- a/api/system/router.go +++ b/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) }