mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
fix(settings): POST /logout after credential change
This commit is contained in:
parent
4e7687e2fe
commit
f69cdd3841
1 changed files with 3 additions and 4 deletions
|
|
@ -52,10 +52,9 @@ async function sendUpdateUser() {
|
||||||
try {
|
try {
|
||||||
const msg = await HttpUtil.post('/panel/setting/updateUser', user);
|
const msg = await HttpUtil.post('/panel/setting/updateUser', user);
|
||||||
if (msg?.success) {
|
if (msg?.success) {
|
||||||
// Force re-login at the standard logout path; basePath is handled
|
await HttpUtil.post('/logout');
|
||||||
// by the Go router so a relative redirect is correct here.
|
const basePath = window.X_UI_BASE_PATH || '/';
|
||||||
const basePath = window.X_UI_BASE_PATH || '';
|
window.location.replace(basePath);
|
||||||
window.location.replace(`${basePath}logout`);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
updating.value = false;
|
updating.value = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue