fix: logout
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
9b1765e9bf
commit
3630a72b78
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue