refactoring

This commit is contained in:
Maxim Devaev
2024-03-25 01:01:21 +02:00
parent 1d48ba0a5a
commit 71e5e4d138
13 changed files with 211 additions and 246 deletions

View File

@@ -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);
}
});
};