aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-17 11:08:08 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commit311a81d67d02b91652934ce0329adc4c4b3577be (patch)
tree571c21b34e0231bad3531a06e00bcf8170da724c
parentd0ca2b1e0eccc05d70f2b83f061a36cebec98e4a (diff)
downloadgenenetwork2-311a81d67d02b91652934ce0329adc4c4b3577be.tar.gz
Update URI forms
-rw-r--r--gn2/wqflask/oauth2/resources.py6
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):