logout after update your password or secret token

This commit is contained in:
MHSanaei 2023-05-02 16:19:49 +03:30
parent 1885a8c0bf
commit 6a33a48a9a

View File

@ -323,6 +323,7 @@
this.loading(false); this.loading(false);
if (msg.success) { if (msg.success) {
this.user = {}; this.user = {};
window.location.replace("/logout")
} }
}, },
async restartPanel() { async restartPanel() {
@ -356,6 +357,7 @@
const msg = await HttpUtil.post("/xui/setting/updateUserSecret", this.user); const msg = await HttpUtil.post("/xui/setting/updateUserSecret", this.user);
if (msg.success){ if (msg.success){
this.user = msg.obj; this.user = msg.obj;
window.location.replace("/logout")
} }
this.loading(false); this.loading(false);
await this.updateAllSetting(); await this.updateAllSetting();