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

This commit is contained in:
Jacky 2025-05-04 01:12:42 +00:00
parent 5b8b3d17c2
commit 0506098647
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -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)
}