Frontend for new SSH page #22
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ function get_keys() {
|
||||||
let request = {auth: {user: username, pass: password}};
|
let request = {auth: {user: username, pass: password}};
|
||||||
|
|
||||||
fetch('http://127.0.0.1:8087/ldap/ssh', {
|
fetch('http://127.0.0.1:8087/ldap/ssh', {
|
||||||
|
// can switch this to get with auth headers i think
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(request),
|
body: JSON.stringify(request),
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
|
@ -42,7 +43,7 @@ function add_key() {
|
||||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Key cannot be empty</span>";
|
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Key cannot be empty</span>";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fetch('http://127.0.0.1:8087/ldap/add', {
|
fetch('http://127.0.0.1:8087/ldap/ssh/add', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify(request),
|
body: JSON.stringify(request),
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
|
@ -74,7 +75,7 @@ function delete_key(row_idx) {
|
||||||
let password = document.getElementById("pass").value;
|
let password = document.getElementById("pass").value;
|
||||||
let request = {auth: {user: username, pass: password}, key: key};
|
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',
|
method: 'DELETE',
|
||||||
body: JSON.stringify(request),
|
body: JSON.stringify(request),
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
|
|
Loading…
Reference in a new issue