mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +00:00
eliminato to_json dalla risposta get
This commit is contained in:
parent
1b08a46ea6
commit
f149fdc06c
1 changed files with 3 additions and 3 deletions
|
@ -20,8 +20,8 @@ def page_user(email):
|
|||
return json_error("Thou art not authorized."), 403
|
||||
target = find_user(email).to_json()
|
||||
if not target:
|
||||
json_error("Could not locate the user."), 404
|
||||
return json_success(target.to_json())
|
||||
return json_error("Could not locate the user."), 404
|
||||
return json_success(target)
|
||||
elif request.method == "DELETE":
|
||||
if not user.isAdmin:
|
||||
return json_error("User is not admin."), 403
|
||||
|
@ -38,7 +38,7 @@ def page_user(email):
|
|||
return json_error("Thou art not authorized."), 403
|
||||
target = find_user(email)
|
||||
if not target:
|
||||
json_error("Could not locate the user."), 404
|
||||
return json_error("Could not locate the user."), 404
|
||||
if request.json.get("username"):
|
||||
target.username = request.json.get("username")
|
||||
if request.json.get("password"):
|
||||
|
|
Loading…
Reference in a new issue