mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
1 parent
82460cf8e9
commit
4cb5444f3b
5 files changed
+22
-9
No files matched your search
@@ -18,8 +18,9 @@ async function handlerSwitchAccount(ev) {
|
||||
const target = await selectUser('Hint::icon::switch_account');
|
||||
if (!target) return;
|
||||
try {
|
||||
await request.get('/account', { uid: target._id });
|
||||
window.location.reload();
|
||||
const res = await request.get(`/account/${target._id}`);
|
||||
if (res.url) window.location.href = res.url;
|
||||
else window.location.reload();
|
||||
} catch (error) {
|
||||
Notification.error(error.message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user