This commit is contained in:
Bruno Rybársky 2024-02-07 18:31:01 +01:00
parent c4c9e021e4
commit fd8e5e9ebe

@ -1,4 +1,5 @@
let UserInfo = {}; let UserInfo = {};
async function handleResponse(data, successMessage, failureMessage) { async function handleResponse(data, successMessage, failureMessage) {
const statusMessageContainer = document.getElementById("statusMessageContainer"); const statusMessageContainer = document.getElementById("statusMessageContainer");
@ -348,15 +349,15 @@ async function getUserInfo() {
const data = { const data = {
action: "get_user_info", action: "get_user_info",
}; };
const result = await doAction('/account', data, "User info retrieved Successfully!", "User info retrieval failed.", true);
doAction('/account', data, "User info retrieved Successfully!", "User info retrieval failed.", true) .then((result) => {
if (result && result.Status === "Success") { if (result && result.Status === "Success") {
result.UserInfo.forEach(function callback(value, index) { result.UserInfo.forEach((value, index) => {
localStorage.setItem("UserInfo_" + index, value); localStorage.setItem("UserInfo_" + index, value);
UserInfo[index] = value; UserInfo[index] = value;
}); });
} }
});
} }
//User settings end //User settings end
@ -421,6 +422,7 @@ async function deleteActivationCode(activationCode) {
await listActivationCodes(); await listActivationCodes();
umami.track("deleteActivationCode"); umami.track("deleteActivationCode");
} }
//Admin settings end //Admin settings end
if (document.readyState !== "loading") { if (document.readyState !== "loading") {