diff options
author | Frederick Muriuki Muriithi | 2024-06-17 11:08:08 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-17 11:08:08 -0500 |
commit | b5ecabfecbc1e7a8ed1a2b92fd73094204541d83 (patch) | |
tree | 96324583f8dcbba0f8bbbe53a70ee9d3ef4a1726 /gn2/wqflask/oauth2 | |
parent | 193a0f02ce31af590c8ab04c08d114b8f5efe0c4 (diff) | |
download | genenetwork2-b5ecabfecbc1e7a8ed1a2b92fd73094204541d83.tar.gz |
Update URI forms
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/resources.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gn2/wqflask/oauth2/resources.py b/gn2/wqflask/oauth2/resources.py index 32d89b14..7a705856 100644 --- a/gn2/wqflask/oauth2/resources.py +++ b/gn2/wqflask/oauth2/resources.py @@ -66,7 +66,7 @@ def __compute_page__(submit, current_page): return current_page + 1 return (current_page - 1) or 1 -@resources.route("/view/<uuid:resource_id>", methods=["GET"]) +@resources.route("/<uuid:resource_id>/view", methods=["GET"]) @require_oauth2 def view_resource(resource_id: UUID): """View the given resource.""" @@ -301,7 +301,7 @@ def delete_resource(resource_id: UUID): """Delete the given resource.""" return "WOULD DELETE THE GIVEN RESOURCE" -@resources.route("/<uuid:resource_id>/role/<uuid:role_id>", methods=["GET"]) +@resources.route("/<uuid:resource_id>/roles/<uuid:role_id>", methods=["GET"]) @require_oauth2 def view_resource_role(resource_id: UUID, role_id: UUID): """View resource role page.""" @@ -350,7 +350,7 @@ def view_resource_role(resource_id: UUID, role_id: UUID): resource_error=process_error(error)), lambda resource: __fetch_resource_role__(resource=resource)) -@resources.route("/<uuid:resource_id>/role/<uuid:role_id>/unassign-privilege", +@resources.route("/<uuid:resource_id>/roles/<uuid:role_id>/unassign-privilege", methods=["GET", "POST"]) @require_oauth2 def unassign_privilege_from_resource_role(resource_id: UUID, role_id: UUID): |