fix(settings): POST /logout after credential change

This commit is contained in:
MHSanaei 2026-05-13 12:41:55 +02:00
parent 4e7687e2fe
commit f69cdd3841
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A

View file

@ -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;