From e838cba37f7f2bb430deef3012599670e94fdb27 Mon Sep 17 00:00:00 2001 From: derlole <122916573+derlole@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:24:39 +0000 Subject: [PATCH] mqtt test fin --- templates/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 03ff30b..bd12029 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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";