From d18a1a37ceb7c005a5a829ba8b9ef2d103c181b5 Mon Sep 17 00:00:00 2001 From: Sanaei Date: Tue, 4 Feb 2025 11:27:58 +0100 Subject: revert group management (#2656) * Revert "json post base path bug fixed (#2647)" This reverts commit 04cf250a547bb64265d256e7d15af7cea5ecfa67. * Revert "Group Management of Subscription Clients" * Revert "fix getSubGroupClients for enable/disable and edit clients." * Revert "Enhance database initialization in db.go (#2645)" This reverts commit 66fe84181b9c4e2f6c6be943a7f486b4308c32ff. * Revert "Add checkpoint handling in CloseDB function (#2646)" This reverts commit 4dd40f6f192e3f94f2ea4fe9e942e6663b5a1527. * Revert "Improved database model migration and added indexing (#2655)" This reverts commit b922d986d6783ce28d00ca948024dee44a11f29e. --- web/assets/js/model/setting.js | 1 - web/assets/js/util/utils.js | 35 ----------------------------------- 2 files changed, 36 deletions(-) (limited to 'web/assets') diff --git a/web/assets/js/model/setting.js b/web/assets/js/model/setting.js index 72fe77ef..8e010598 100644 --- a/web/assets/js/model/setting.js +++ b/web/assets/js/model/setting.js @@ -26,7 +26,6 @@ class AllSetting { this.xrayTemplateConfig = ""; this.secretEnable = false; this.subEnable = false; - this.subSyncEnable = true; this.subListen = ""; this.subPort = 2096; this.subPath = "/sub/"; diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js index 10825490..30f1f6a2 100644 --- a/web/assets/js/util/utils.js +++ b/web/assets/js/util/utils.js @@ -70,41 +70,6 @@ class HttpUtil { } return msg; } - - static async jsonPost(url, data) { - let msg; - try { - const requestOptions = { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(data), - }; - const resp = await fetch(basePath + url.replace(/^\/+|\/+$/g, ''), requestOptions); - const response = await resp.json(); - - msg = this._respToMsg({data : response}); - } catch (e) { - msg = new Msg(false, e.toString()); - } - this._handleMsg(msg); - return msg; - } - - static async postWithModalJson(url, data, modal) { - if (modal) { - modal.loading(true); - } - const msg = await this.jsonPost(url, data); - if (modal) { - modal.loading(false); - if (msg instanceof Msg && msg.success) { - modal.close(); - } - } - return msg; - } } class PromiseUtil { -- cgit v1.2.3