From 311a81d67d02b91652934ce0329adc4c4b3577be Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 17 Jun 2024 11:08:08 -0500 Subject: Update URI forms --- gn2/wqflask/oauth2/resources.py | 6 +++--- 1 file 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/", methods=["GET"]) +@resources.route("//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("//role/", methods=["GET"]) +@resources.route("//roles/", 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("//role//unassign-privilege", +@resources.route("//roles//unassign-privilege", methods=["GET", "POST"]) @require_oauth2 def unassign_privilege_from_resource_role(resource_id: UUID, role_id: UUID): -- cgit v1.2.3