renew-token-check #98

Merged
jsegarra merged 8 commits from wbuezas/hedera-web-mindshore:renew-token-check into beta 2025-01-17 23:13:21 +00:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit 3630a72b78 - Show all commits

View File

@ -37,11 +37,12 @@ export const useUserStore = defineStore('user', () => {
if (!autoLoginStatus) {
router.push({ name: 'login' });
}
} else {
await fetchTokenConfig();
await fetchUser();
await supplantInit();
startInterval();
}
await fetchTokenConfig();
await fetchUser();
await supplantInit();
startInterval();
};
const getToken = () => {
@ -173,9 +174,8 @@ export const useUserStore = defineStore('user', () => {
const logout = async () => {
try {
await api.post('Accounts/logout');
await destroy();
} catch (e) {}
destroy();
useAppStore().onLogout();
};