aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/static
diff options
context:
space:
mode:
authorJohn Nduli2024-08-06 08:36:28 +0300
committerAlexander_Kabui2024-08-28 15:02:46 +0300
commit4aa2d88b2915323398c5b14a64e10f822df9a93e (patch)
tree0d7cb188fa83428e43525910b2e46bf16155d97b /gn2/wqflask/static
parent6d39ea99231aa0d07726a013c9a17c89a72e407a (diff)
downloadgenenetwork2-4aa2d88b2915323398c5b14a64e10f822df9a93e.tar.gz
fix: use bearer token to query auth server
Diffstat (limited to 'gn2/wqflask/static')
-rw-r--r--gn2/wqflask/static/new/javascript/auth/search_mrna.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/gn2/wqflask/static/new/javascript/auth/search_mrna.js b/gn2/wqflask/static/new/javascript/auth/search_mrna.js
index 76b2dc6b..ed264bb4 100644
--- a/gn2/wqflask/static/new/javascript/auth/search_mrna.js
+++ b/gn2/wqflask/static/new/javascript/auth/search_mrna.js
@@ -15,12 +15,17 @@ function search_mrna() {
selected = JSON.parse(document.getElementById(
"tbl-link").getAttribute("data-datasets"));
species_name = document.getElementById("txt-species-name").value
+ bearer_token = document.getElementById("bearer_token").value
search_endpoint = "/auth/data/mrna/search"
search_table = new TableDataSource(
"#tbl-search", "data-datasets", search_checkbox);
$.ajax(
form.action,
{
+
+ "beforeSend": function (xhr) {
+ xhr.setRequestHeader('Authorization', 'Bearer ' + bearer_token);
+ },
"method": "POST",
"contentType": "application/json; charset=utf-8",
"dataType": "json",