From 0af81c6efa79522abbdce86942aea13f738cffb0 Mon Sep 17 00:00:00 2001 From: daragh Date: Sat, 30 Dec 2023 01:55:45 +0000 Subject: [PATCH] fix : fetch paths --- src/scripts/ssh.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts/ssh.js b/src/scripts/ssh.js index b791691..b4ec2dd 100644 --- a/src/scripts/ssh.js +++ b/src/scripts/ssh.js @@ -7,6 +7,7 @@ function get_keys() { let request = {auth: {user: username, pass: password}}; fetch('http://127.0.0.1:8087/ldap/ssh', { + // can switch this to get with auth headers i think method: 'POST', body: JSON.stringify(request), mode: 'cors', @@ -42,7 +43,7 @@ function add_key() { document.getElementById('formStatus').innerHTML = "Key cannot be empty"; return; } - fetch('http://127.0.0.1:8087/ldap/add', { + fetch('http://127.0.0.1:8087/ldap/ssh/add', { method: 'POST', body: JSON.stringify(request), mode: 'cors', @@ -74,7 +75,7 @@ function delete_key(row_idx) { let password = document.getElementById("pass").value; let request = {auth: {user: username, pass: password}, key: key}; - fetch('http://127.0.0.1:8087/ldap/delete', { + fetch('http://127.0.0.1:8087/ldap/ssh', { method: 'DELETE', body: JSON.stringify(request), mode: 'cors',