From 3b23a9043ccf45b629977018b23b4f8dfcc76eed Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 5 Jul 2023 23:16:20 +0000 Subject: [PATCH] update client with new user config endpoint paths --- scripts/account.js | 2 +- scripts/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/account.js b/scripts/account.js index 7a7e252..6b2336e 100644 --- a/scripts/account.js +++ b/scripts/account.js @@ -25,7 +25,7 @@ async function init () { if (cookie === "") { goToPage("login.html"); } - const resources = await requestAPI("/user/resources"); + const resources = await requestAPI("/user/dynamic/resources"); const instances = await requestAPI("/user/config/cluster"); const nodes = await requestAPI("/user/config/nodes"); document.querySelector("#username").innerText = `Username: ${getCookie("username")}`; diff --git a/scripts/utils.js b/scripts/utils.js index 813919d..f0d0478 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -146,7 +146,7 @@ export function getCookie (cname) { } export async function requestTicket (username, password, realm) { - const response = await requestAPI("/ticket", "POST", { username: `${username}@${realm}`, password }, false); + const response = await requestAPI("/auth/ticket", "POST", { username: `${username}@${realm}`, password }, false); return response; } @@ -244,7 +244,7 @@ export function getURIData () { } export async function deleteAllCookies () { - await requestAPI("/ticket", "DELETE"); + await requestAPI("/auth/ticket", "DELETE"); } export function setTitleAndHeader () {