core&ui: allow SU edit user profile & security (#561) (#562)

This commit is contained in:
panda authored and GitHub committed 2023-04-30 00:42:50 +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);
}