瀏覽代碼

fix updateSecret

MHSanaei 1 年之前
父節點
當前提交
c9f245cb25
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      web/html/xui/settings.html

+ 3 - 3
web/html/xui/settings.html

@@ -425,7 +425,7 @@
                 this.loading(false);
                 if (msg.success) {
                     this.user = {};
-                    window.location.replace(basePath + "logout");
+                    window.location.replace;
                 }
             },
             async restartPanel() {
@@ -462,9 +462,9 @@
             async updateSecret() {
                 this.loading(true);
                 const msg = await HttpUtil.post("/panel/setting/updateUserSecret", this.user);
-                if (msg.success) {
+                if (msg && msg.obj) {
                     this.user = msg.obj;
-                    window.location.replace(basePath + "logout");
+                    window.location.replace;
                 }
                 this.loading(false);
                 await this.updateAllSetting();