summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/gpio.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-25 01:01:21 +0200
committerMaxim Devaev <[email protected]>2024-03-25 01:29:43 +0200
commit71e5e4d138ebc36644b022aa18e5990caa4bf9c5 (patch)
tree4ee39613616ef9bdd403c82a0e6ad34ec11315b7 /web/share/js/kvm/gpio.js
parent1d48ba0a5a4f347321f7f46cd0fe317e3c87d3df (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/gpio.js')
-rw-r--r--web/share/js/kvm/gpio.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js
index b765820d..db259cee 100644
--- a/web/share/js/kvm/gpio.js
+++ b/web/share/js/kvm/gpio.js
@@ -209,13 +209,11 @@ export function Gpio(__recorder) {
};
var __sendPost = function(url) {
- let http = tools.makeRequest("POST", url, function() {
- if (http.readyState === 4) {
- if (http.status === 409) {
- wm.error("Performing another operation for this GPIO channel.<br>Please try again later");
- } else if (http.status !== 200) {
- wm.error("GPIO error:<br>", http.responseText);
- }
+ tools.httpPost(url, function(http) {
+ if (http.status === 409) {
+ wm.error("Performing another operation for this GPIO channel.<br>Please try again later");
+ } else if (http.status !== 200) {
+ wm.error("GPIO error:<br>", http.responseText);
}
});
};