diff options
author | Arun Isaac | 2022-09-08 22:40:35 +0530 |
---|---|---|
committer | Arun Isaac | 2022-09-08 22:59:49 +0530 |
commit | 203d073c9c28b2aa26c78718160136dab6dd8470 (patch) | |
tree | cdaa51de5af78b4d92bead1b607832da45ab69f6 /wqflask | |
parent | 08a937631da94c8158068072d2ce2346c29e9cbe (diff) | |
download | genenetwork2-203d073c9c28b2aa26c78718160136dab6dd8470.tar.gz |
Make GN_SERVER_URL the genenetwork3 API endpoint.
From now on, GN_SERVER_URL will be the genenetwork3 API endpoint. For
example, GN_SERVER_URL=https://gn3.genenetwork.org/api
* wqflask/wqflask/collect.py (view_collection),
wqflask/wqflask/partial_correlations_views.py (partial_correlations,
poll_partial_correlation_results),
wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js (defaultStatusCodeFunctions):
Do not append api to GN_SERVER_URL.
* etc/default_settings.py (GN_SERVER_URL): Append /api.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/collect.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/partial_correlations_views.py | 6 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 87a96a26..b344bd99 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -277,7 +277,7 @@ def view_collection(): collection_info = dict( trait_obs=trait_obs, uc=uc, - heatmap_data_url=f"{GN_SERVER_URL}api/heatmaps/clustered") + heatmap_data_url=f"{GN_SERVER_URL}/heatmaps/clustered") if "json" in params: return json.dumps(json_version) diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py index 358a9d3b..91948722 100644 --- a/wqflask/wqflask/partial_correlations_views.py +++ b/wqflask/wqflask/partial_correlations_views.py @@ -287,7 +287,7 @@ def partial_correlations(): "with_target_db": args["with_target_db"] } return handle_response(requests.post( - url=f"{GN_SERVER_URL}api/correlation/partial", + url=f"{GN_SERVER_URL}/correlation/partial", json=post_data)) for error in args["errors"]: @@ -302,7 +302,7 @@ def partial_correlations(): "with_target_db": args["with_target_db"] } return handle_response(requests.post( - url=f"{GN_SERVER_URL}api/correlation/partial", + url=f"{GN_SERVER_URL}/correlation/partial", json=post_data)) for error in args["errors"]: @@ -347,7 +347,7 @@ def process_pcorrs_command_output(result): @app.route("/partial_correlations/<command_id>", methods=["GET"]) def poll_partial_correlation_results(command_id): response = requests.get( - url=f"{GN_SERVER_URL}api/async_commands/state/{command_id}") + url=f"{GN_SERVER_URL}/async_commands/state/{command_id}") if response.status_code == 200: data = response.json() diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js index b58b7c70..29c9d3c1 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -38,7 +38,7 @@ if (typeof gn_server_url === 'undefined'){ gn_server_url = $("#search form").attr("data-gn_server_url") } -$.ajax(gn_server_url +'api/menu/generate/json', { +$.ajax(gn_server_url +'/menu/generate/json', { dataType: 'json', success: process_json, error: indicate_error, |