fix: enforce license-backed user capacity

This commit is contained in:
ShukeBta
2026-06-25 13:27:15 +08:00
parent bce0143dbc
commit 74aa654c92
8 changed files with 155 additions and 17 deletions
+1
View File
@@ -43,6 +43,7 @@ func createUserHandler(svc *service.Container) gin.HandlerFunc {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
refreshLicenseCapacityBestEffort(c.Request.Context(), svc)
u, _, err := svc.Auth.Register(c.Request.Context(), req.Username, req.Password)
if err != nil {
writeUserMutationError(c, svc, err)