From efa9ee13fd136554e537d7e8883cf81f955fd95d Mon Sep 17 00:00:00 2001 From: MrLetsplay2003 Date: Sun, 13 Oct 2024 18:03:40 +0200 Subject: [PATCH] Update code --- script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 54af9f1..f3ca310 100644 --- a/script.js +++ b/script.js @@ -32,7 +32,7 @@ function updateStatus(data) { } ] }; - lastUpdatedEl.textContent = new Date(data.time).toLocaleString(); + lastUpdatedEl.textContent = new Date(data.unixTime).toLocaleString(); statusEl.innerHTML = ''; data.services.forEach(service => { @@ -53,6 +53,8 @@ function updateStatus(data) { }); } +updateStatus(null); + fetch('https://amogus.cringe-studios.com/api/status') .then(response => response.json()) .then(data => updateStatus(data))