aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-06-08 20:45:24 +0300
committerFrederick Muriuki Muriithi2023-06-08 20:45:51 +0300
commit2e74479a895d10994671b719274f1e4203199d22 (patch)
tree0c7b593d5b3c9deadc745d8a0ac89676cd9e1072 /wqflask
parent01aba692603c2f656510bfa3818b181fadaeac54 (diff)
downloadgenenetwork2-2e74479a895d10994671b719274f1e4203199d22.tar.gz
bug: Fix URI to prevent unnecessary redirect.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/oauth2/checks.py2
-rw-r--r--wqflask/wqflask/oauth2/request_utils.py2
-rw-r--r--wqflask/wqflask/oauth2/resources.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/oauth2/checks.py b/wqflask/wqflask/oauth2/checks.py
index 38561c6f..473bfe23 100644
--- a/wqflask/wqflask/oauth2/checks.py
+++ b/wqflask/wqflask/oauth2/checks.py
@@ -32,7 +32,7 @@ def require_oauth2(func):
client = OAuth2Session(
OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, token=token)
resp = client.get(
- urljoin(GN_SERVER_URL, "oauth2/user"))
+ urljoin(GN_SERVER_URL, "oauth2/user/"))
user_details = resp.json()
if not user_details.get("error", False):
return func(*args, **kwargs)
diff --git a/wqflask/wqflask/oauth2/request_utils.py b/wqflask/wqflask/oauth2/request_utils.py
index b9f2aa7d..992720f1 100644
--- a/wqflask/wqflask/oauth2/request_utils.py
+++ b/wqflask/wqflask/oauth2/request_utils.py
@@ -23,7 +23,7 @@ def raise_unimplemented():
raise Exception("NOT IMPLEMENTED")
def user_details():
- return oauth2_get("oauth2/user").either(
+ return oauth2_get("oauth2/user/").either(
lambda err: {},
lambda usr_dets: usr_dets)
diff --git a/wqflask/wqflask/oauth2/resources.py b/wqflask/wqflask/oauth2/resources.py
index 5f7faff9..822c6e43 100644
--- a/wqflask/wqflask/oauth2/resources.py
+++ b/wqflask/wqflask/oauth2/resources.py
@@ -87,7 +87,7 @@ def view_resource(resource_id: uuid.UUID):
resource, unlinked_data, users_n_roles, this_user, groles))
def __users_n_roles_success__(resource, unlinked_data, users_n_roles):
- return oauth2_get("oauth2/user").either(
+ return oauth2_get("oauth2/user/").either(
lambda err: render_ui(
"oauth2/view-resources.html",
this_user_error=process_error(err)),