From a1b999240aa885f69040b82926832728c7005cce Mon Sep 17 00:00:00 2001 From: Filip Borum Poulsen Date: Sat, 7 Dec 2024 16:14:56 +0100 Subject: [PATCH] Added http to fetch calls --- public/index.html | 16 ++++++++-------- public/main.js | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/public/index.html b/public/index.html index 1d4c73c..dbe55ef 100755 --- a/public/index.html +++ b/public/index.html @@ -41,20 +41,20 @@

Relay 1

- - + +

Relay 2

- - + +

Relay 3

- - + +

Relay 4

- - + + diff --git a/public/main.js b/public/main.js index 18c4290..f4002db 100755 --- a/public/main.js +++ b/public/main.js @@ -40,10 +40,10 @@ async function main() { const relay3Div = document.getElementById('relay3'); const relay4Div = document.getElementById('relay4'); - relay1Div.innerText = await (await fetch("10.242.84.111:8080/status/19")).text(); - relay2Div.innerText = await (await fetch("10.242.84.111:8080/status/13")).text(); - relay3Div.innerText = await (await fetch("10.242.84.111:8080/status/6")).text(); - relay4Div.innerText = await (await fetch("10.242.84.111:8080/status/5")).text(); + relay1Div.innerText = await (await fetch("http://10.242.84.111:8080/status/19")).text(); + relay2Div.innerText = await (await fetch("http://10.242.84.111:8080/status/13")).text(); + relay3Div.innerText = await (await fetch("http://10.242.84.111:8080/status/6")).text(); + relay4Div.innerText = await (await fetch("http://10.242.84.111:8080/status/5")).text(); } main();