From 2353817c57f676d01bc0e51cfd4d8dc8d46e1bb0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 5 Jun 2024 16:12:35 -0500 Subject: 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. --- gn2/wqflask/static/new/javascript/auth/search_phenotypes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn2/wqflask/static') 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("", job_id); $("#txt-search").prop("disabled", true); $.ajax( endpoint, -- cgit v1.2.3