mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 10:31:54 +08:00
refactoring
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user