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 {
const msg = await HttpUtil.post('/panel/setting/updateUser', user);
if (msg?.success) {
// Force re-login at the standard logout path; basePath is handled
// by the Go router so a relative redirect is correct here.
const basePath = window.X_UI_BASE_PATH || '';
window.location.replace(`${basePath}logout`);
await HttpUtil.post('/logout');
const basePath = window.X_UI_BASE_PATH || '/';
window.location.replace(basePath);
}
} finally {
updating.value = false;