mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-28 23:44:19 +00:00
minor bug fixing
This commit is contained in:
parent
29ec779203
commit
442d1c60d9
1 changed files with 2 additions and 2 deletions
|
@ -118,11 +118,11 @@ def page_alert(aid):
|
||||||
if not alert:
|
if not alert:
|
||||||
return json_error("Could not find alert."), 404
|
return json_error("Could not find alert."), 404
|
||||||
if alert.repository not in [a.repository for a in user.authorizations] + user.owner_of:
|
if alert.repository not in [a.repository for a in user.authorizations] + user.owner_of:
|
||||||
json_error("You are not authorized to proceed."), 403
|
return json_error("You are not authorized to proceed."), 403
|
||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
return json_success(alert.to_json()), 200
|
return json_success(alert.to_json()), 200
|
||||||
if alert.repository not in user.owner_of:
|
if alert.repository not in user.owner_of:
|
||||||
json_error("You are not authorized to proceed."), 403
|
return json_error("You are not authorized to proceed."), 403
|
||||||
if request.method == "PATCH":
|
if request.method == "PATCH":
|
||||||
if 'name' in request.json:
|
if 'name' in request.json:
|
||||||
alert.name = request.json['name']
|
alert.name = request.json['name']
|
||||||
|
|
Loading…
Reference in a new issue