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