show alert after changing

This commit is contained in:
SemvdH
2025-11-18 00:22:06 +01:00
parent 9bf322ff47
commit 9d9e0fa69d

View File

@@ -72,7 +72,12 @@
fetch(URL, { method: "POST" })
.then(res => res.json())
.then(data => {
console.log(data)
console.log("server response:" + data)
if (data.success) {
alert("Track changed successfully!");
} else {
alert("Failed to change track: " + data.message);
}
});
}
@@ -122,6 +127,11 @@
.then(res => res.json())
.then(data => {
console.log("Server response:", data);
if (data.success) {
alert("Cars changed successfully!");
} else {
alert("Failed to change cars: " + data.message);
}
});
}