fix: log into next stored account on logout
This commit is contained in:
parent
8e241b3435
commit
ba1f8ef063
1 changed files with 12 additions and 6 deletions
|
@ -24,13 +24,19 @@
|
||||||
res.message,
|
res.message,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
delete self.LOGIN_ACCOUNT_TOKENS[res.payload];
|
|
||||||
self.set_login_account_tokens(self.LOGIN_ACCOUNT_TOKENS);
|
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
setTimeout(() => {
|
delete self.LOGIN_ACCOUNT_TOKENS[res.payload];
|
||||||
window.location.href = "/";
|
self.set_login_account_tokens(self.LOGIN_ACCOUNT_TOKENS);
|
||||||
}, 150);
|
|
||||||
|
const next = Object.entries(self.LOGIN_ACCOUNT_TOKENS)[0];
|
||||||
|
|
||||||
|
if (next) {
|
||||||
|
self.login(next[0]);
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "/";
|
||||||
|
}, 150);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue