receive status from api
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log("server response:" + data)
|
console.log("server response:" + data)
|
||||||
if (data.success) {
|
if (data.status == "success") {
|
||||||
alert("Track changed successfully!");
|
alert("Track changed successfully!");
|
||||||
} else {
|
} else {
|
||||||
alert("Failed to change track: " + data.message);
|
alert("Failed to change track: " + data.message);
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log("Server response:", data);
|
console.log("Server response:", data);
|
||||||
if (data.success) {
|
if (data.status == "success") {
|
||||||
alert("Cars changed successfully!");
|
alert("Cars changed successfully!");
|
||||||
} else {
|
} else {
|
||||||
alert("Failed to change cars: " + data.message);
|
alert("Failed to change cars: " + data.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user