fix: restart permission check (#3011)

This commit is contained in:
icey-yu 2024-12-27 16:23:12 +08:00 committed by GitHub
parent dec423eeb3
commit 1af31847fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,7 +314,7 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, cf
configGroup.POST("/reset_config", cm.ResetConfig)
}
{
r.POST("/restart", cm.Restart)
r.POST("/restart", cm.CheckAdmin, cm.Restart)
}
return r, nil
}