diff options
author | Maxim Devaev <[email protected]> | 2024-03-25 01:01:21 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-03-25 01:29:43 +0200 |
commit | 71e5e4d138ebc36644b022aa18e5990caa4bf9c5 (patch) | |
tree | 4ee39613616ef9bdd403c82a0e6ad34ec11315b7 /web/share/js/kvm/atx.js | |
parent | 1d48ba0a5a4f347321f7f46cd0fe317e3c87d3df (diff) |
refactoring
Diffstat (limited to 'web/share/js/kvm/atx.js')
-rw-r--r-- | web/share/js/kvm/atx.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js index 61d9b5f9..53c290cf 100644 --- a/web/share/js/kvm/atx.js +++ b/web/share/js/kvm/atx.js @@ -73,13 +73,11 @@ export function Atx(__recorder) { var __clickButton = function(button, confirm_msg) { let click_button = function() { - let http = tools.makeRequest("POST", `/api/atx/click?button=${button}`, function() { - if (http.readyState === 4) { - if (http.status === 409) { - wm.error("Performing another ATX operation for other client.<br>Please try again later"); - } else if (http.status !== 200) { - wm.error("Click error:<br>", http.responseText); - } + tools.httpPost(`/api/atx/click?button=${button}`, function(http) { + if (http.status === 409) { + wm.error("Performing another ATX operation for other client.<br>Please try again later"); + } else if (http.status !== 200) { + wm.error("Click error:<br>", http.responseText); } }); __recorder.recordAtxButtonEvent(button); |