aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/static/new/javascript
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-05 16:12:35 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commit2439a4a0af29a57adc55fec093e4231c7b320ff6 (patch)
treecce7a4d98b22e173a149108b7533f4be9e6c974d /gn2/wqflask/static/new/javascript
parent67df44ac2df9f05da22634f04eaaf29393710e9f (diff)
downloadgenenetwork2-2439a4a0af29a57adc55fec093e4231c7b320ff6.tar.gz
Build phenotype results template URI on backend
Build the template URI on the backend to remove the need to remember to update the javascript if the URI changes in the future.
Diffstat (limited to 'gn2/wqflask/static/new/javascript')
-rw-r--r--gn2/wqflask/static/new/javascript/auth/search_phenotypes.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js b/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
index 99ecb16e..e9ef2683 100644
--- a/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
+++ b/gn2/wqflask/static/new/javascript/auth/search_phenotypes.js
@@ -96,8 +96,8 @@ function display_search_results(data, textStatus, jqXHR) {
* @param {UUID}: The job id to fetch data for
*/
function fetch_search_results(job_id, success, error=default_error_fn) {
- host = $("#frm-search-traits").attr("data-gn-server-url");
- endpoint = host + "auth/data/search/phenotype/" + job_id
+ endpoint = $("#frm-search-traits").attr(
+ "data-pheno-results-template").replace("<jobid>", job_id);
$("#txt-search").prop("disabled", true);
$.ajax(
endpoint,