fix(user): replace 'user' type with 'visitor' in user creation
refactor(session): improve token expiration handling in GetTokenInfo chore: add /dist to gitignore
This commit is contained in:
+2
-2
@@ -312,8 +312,8 @@ func CreateUserHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if req.Type != "admin" && req.Type != "user" && req.Type != "superuser" {
|
||||
utils.SendErrorResponse(w, http.StatusBadRequest, "Invalid type: must be 'admin' or 'user' or 'superuser'")
|
||||
if req.Type != "admin" && req.Type != "visitor" && req.Type != "superuser" {
|
||||
utils.SendErrorResponse(w, http.StatusBadRequest, "Invalid type: must be 'admin' or 'visitor' or 'superuser'")
|
||||
postLog.Warning(fmt.Sprintf("[CreateUserHandler] CreateUser failed: invalid type: %s", req.Type))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user