This commit is contained in:
Viet An
2026-07-01 10:59:23 +07:00
parent e9e4fbe24f
commit 68872d3f06
12 changed files with 66 additions and 117 deletions

View File

@@ -69,10 +69,10 @@ async function checkRedirect() {
}
async function checkLogin() {
if ($store.login ? $store.login.token : false) {
if ($store.login?.token) {
$store.commit("rights", await $getdata("grouprights", { filter: { group: $store.login.type } }));
let authtoken = await $getdata("token", { first: true, filter: { token: $store.login.token } });
if (authtoken ? authtoken.expiry : true) return; /* $requestLogin(); */
const authtoken = await $getdata("token", { first: true, filter: { token: $store.login.token } });
if (authtoken?.expiry) return; /* $requestLogin(); */
authorized.value = true;
}
// else $requestLogin();