mqtt test fin

This commit is contained in:
derlole
2025-04-25 11:24:39 +00:00
parent f3ce1ea066
commit e838cba37f

View File

@@ -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";