diff --git a/backend/internal/httpapi/users_api.go b/backend/internal/httpapi/users_api.go index eb593ff..b1efc52 100644 --- a/backend/internal/httpapi/users_api.go +++ b/backend/internal/httpapi/users_api.go @@ -26,7 +26,10 @@ func (s *Server) requireSuperAdmin(c *gin.Context) { setupReady := s.config.SetupReady s.configMu.RUnlock() if !setupReady { - c.Next() + c.AbortWithStatusJSON(http.StatusConflict, gin.H{ + "error": "请先完成初始化配置", + "request_id": requestIDFromContext(c), + }) return } session, ok := s.currentAuthSession(c)