receive status from api

This commit is contained in:
SemvdH
2025-11-18 00:24:02 +01:00
parent 1db524ee1a
commit bddebec28b

View File

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