diff options
author | Frederick Muriuki Muriithi | 2024-06-17 11:07:33 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-17 11:07:33 -0500 |
commit | 193a0f02ce31af590c8ab04c08d114b8f5efe0c4 (patch) | |
tree | bd517d1558e7cdcfd68865115be766bd4109cd7c /gn2 | |
parent | 999489a44405664d1d289158763474dae0b99297 (diff) | |
download | genenetwork2-193a0f02ce31af590c8ab04c08d114b8f5efe0c4.tar.gz |
Use json for communication with gn-auth
Diffstat (limited to 'gn2')
-rw-r--r-- | gn2/wqflask/oauth2/resources.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gn2/wqflask/oauth2/resources.py b/gn2/wqflask/oauth2/resources.py index 58e02368..32d89b14 100644 --- a/gn2/wqflask/oauth2/resources.py +++ b/gn2/wqflask/oauth2/resources.py @@ -58,7 +58,7 @@ def create_resource(): flash("Resource created successfully", "alert-success") return redirect(url_for("oauth2.resource.user_resources")) return oauth2_post( - "auth/resource/create", data=request.form).either( + "auth/resource/create", json=dict(request.form)).either( __perr__, __psuc__) def __compute_page__(submit, current_page): @@ -231,7 +231,7 @@ def assign_role(resource_id: UUID) -> Response: return oauth2_post( f"auth/resource/{resource_id}/user/assign", - data={ + json={ "group_role_id": group_role_id, "user_email": user_email }).either(__assign_error__, __assign_success__) @@ -262,7 +262,7 @@ def unassign_role(resource_id: UUID) -> Response: return oauth2_post( f"auth/resource/{resource_id}/user/unassign", - data={ + json={ "group_role_id": group_role_id, "user_id": user_id }).either(__unassign_error__, __unassign_success__) @@ -285,7 +285,7 @@ def toggle_public(resource_id: UUID): "oauth2.resource.view_resource", resource_id=resource_id)) return oauth2_post( - f"auth/resource/{resource_id}/toggle-public", data={}).either( + f"auth/resource/{resource_id}/toggle-public").either( lambda err: __handle_error__(err), lambda suc: __handle_success__(suc)) |