Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-01-26 21:37:15 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 00:02:19 +0300
commit9fba92d879767394535f70ba83f0a58d6b063a7d (patch)
treef0d6a8cd5d70c5127c9e992f884e39c91eeb9676 /web/assets/js/util/utils.js
parentdaa43540477e18ae5c6e19e887733b793c17ad72 (diff)
v2.1.2
revert #1650 #1661 #1664 #1670 made panel full of bug
Diffstat (limited to 'web/assets/js/util/utils.js')
-rw-r--r--web/assets/js/util/utils.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js
index 48ff237d..61b322bd 100644
--- a/web/assets/js/util/utils.js
+++ b/web/assets/js/util/utils.js
@@ -83,41 +83,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(url, 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 {