From bddebec28bb47b37f0714b563223ae35fb1cc444 Mon Sep 17 00:00:00 2001 From: SemvdH Date: Tue, 18 Nov 2025 00:24:02 +0100 Subject: [PATCH] receive status from api --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d55facd..eab72b8 100644 --- a/index.html +++ b/index.html @@ -73,7 +73,7 @@ .then(res => res.json()) .then(data => { console.log("server response:" + data) - if (data.success) { + if (data.status == "success") { alert("Track changed successfully!"); } else { alert("Failed to change track: " + data.message); @@ -127,7 +127,7 @@ .then(res => res.json()) .then(data => { console.log("Server response:", data); - if (data.success) { + if (data.status == "success") { alert("Cars changed successfully!"); } else { alert("Failed to change cars: " + data.message);