refactor(server): correct stale org wording in messages

This commit is contained in:
2026-07-24 15:07:54 +01:00
parent c3e363eccc
commit e4d7569a1c
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -83,17 +83,17 @@ func HandleBootstrap(c *gin.Context) {
Password string `json:"password"`
}
if err := c.ShouldBindJSON(&body); err != nil || body.InstanceName == "" || body.Email == "" || len(body.Password) < 8 {
c.JSON(http.StatusBadRequest, gin.H{"error": "org_name, email, and password (>=8 chars) required"})
c.JSON(http.StatusBadRequest, gin.H{"error": "instance_name, email, and password (>=8 chars) required"})
return
}
orgCount, err := services.CountInstances()
instanceCount, err := services.CountInstances()
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
var inst *models.Instance
switch orgCount {
switch instanceCount {
case 0:
inst, err = services.CreateInstance(body.InstanceName)
case 1:
@@ -106,7 +106,7 @@ func HandleBootstrap(c *gin.Context) {
c.JSON(http.StatusConflict, gin.H{"error": fmt.Sprintf(
"cannot bootstrap: %d organizations already exist but no users do; "+
"create the owner against the intended inst rather than through setup, "+
"or remove the unintended orgs and retry", orgCount)})
"or remove the unintended orgs and retry", instanceCount)})
return
}
if err != nil {