mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 22:44:19 +00:00
modificato il ritorno per tornare i dati del nuovo utente, perchè tornava i dati di admin
This commit is contained in:
parent
6963e86ee4
commit
9ea852b50b
1 changed files with 3 additions and 3 deletions
|
@ -19,8 +19,8 @@ def page_user_create():
|
||||||
user = find_user(get_jwt_identity())
|
user = find_user(get_jwt_identity())
|
||||||
if not user.isAdmin:
|
if not user.isAdmin:
|
||||||
abort(403)
|
abort(403)
|
||||||
nUser = User(email=request.json.get("email"), password=gen_password(request.json.get("password")),
|
new_user = User(email=request.json.get("email"), password=gen_password(request.json.get("password")),
|
||||||
username=request.json.get("username"))
|
username=request.json.get("username"))
|
||||||
Base.session.add(nUser)
|
Base.session.add(new_user)
|
||||||
Base.session.commit()
|
Base.session.commit()
|
||||||
return json_success(user.to_json())
|
return json_success(new_user.to_json())
|
||||||
|
|
Loading…
Reference in a new issue