diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-26 21:37:15 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-27 00:02:19 +0300 |
| commit | 9fba92d879767394535f70ba83f0a58d6b063a7d (patch) | |
| tree | f0d6a8cd5d70c5127c9e992f884e39c91eeb9676 /web/assets/js | |
| parent | daa43540477e18ae5c6e19e887733b793c17ad72 (diff) | |
v2.1.2
revert #1650 #1661 #1664 #1670
made panel full of bug
Diffstat (limited to 'web/assets/js')
| -rw-r--r-- | web/assets/js/util/utils.js | 35 |
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 { |
