Removed hardcoded string

- Roles are not hardcoded anymore (closes #4)
This commit is contained in:
2026-03-03 15:55:39 +01:00
parent 0afd5bfc3a
commit e7da8c9443
2 changed files with 19 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ func Register(w http.ResponseWriter, r *http.Request) {
}
user.Password = hashed
user.ID = utils.GenerateUUID()
user.Role = "user"
user.Role = models.RoleUser
if err := storage.AddUser(&user); err != nil {
log.Println("POST [api/register] " + r.RemoteAddr + ": " + err.Error())