mqtt test fin
This commit is contained in:
@@ -80,8 +80,9 @@
|
||||
fetch('/unsecure/esp/toggle-machine', { method: 'POST' })
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
if (data.command === 'machineToggle') {
|
||||
//console.log(data);
|
||||
const inner = JSON.parse(data.status);
|
||||
if (inner.command === 'machineToggle') {
|
||||
document.getElementById("machine-status").innerText = "PENDING";
|
||||
} else {
|
||||
document.getElementById("machine-status").innerText = "SOME_ERR";
|
||||
|
||||
Reference in New Issue
Block a user