Irish Rail Tracker
-
-
+
+
diff --git a/functions/index.js b/functions/index.js
index ef9aa38..c40b6e0 100644
--- a/functions/index.js
+++ b/functions/index.js
@@ -18,7 +18,7 @@ exports.getLiveTrainData = functions.https.onRequest((request, response) => {
// fetch the "liveTrainData" collection
admin.firestore().collection('liveTrainData').get().then((snapshot) => {
if (snapshot.empty) {
- response.send({data: "Error fetching live train data from the database"});
+ response.status(404).send({data: "Error fetching live train data from the database"});
return;
}
// iterate through each of the collection's documents
@@ -40,7 +40,7 @@ exports.getStationData = functions.https.onRequest((request, response) => {
// fetch the "stations" collection
admin.firestore().collection('stations').get().then((snapshot) => {
if (snapshot.empty) {
- response.send({data: "Error fetching station data from the database"})
+ response.status(404).send({data: "Error fetching station data from the database"})
return;
}
// iterate through each of the collection's documents
diff --git a/index.html b/index.html
index c1a2a1c..e5a66b2 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
Irish Rail Tracker
diff --git a/src/components/Map.vue b/src/components/Map.vue
index 64aae09..f4211bd 100644
--- a/src/components/Map.vue
+++ b/src/components/Map.vue
@@ -4,9 +4,8 @@
Number of actively running trains: {{ this.numRunningTrains }}
Percentage late: {{ this.percentageLate }}%
Percentage early or ontime: {{ this.percentageEarly }}%
-
-
Latest train: {{ this.latestTrain["TrainCode"][0] }}, {{ this.latestTrain["Direction"][0] }}, {{ this.latestTime }} mins late
-
Earliest train: {{ this.earliestTrain["TrainCode"][0] }}, {{ this.earliestTrain["Direction"][0] }}, {{ this.earliestTime * -1 }} mins early
+
Latest train: {{ this.latestTrain["TrainCode"][0] }}, {{ this.latestTrain["Direction"][0] }}, {{ this.latestTime }} mins late
+
Earliest train: {{ this.earliestTrain["TrainCode"][0] }}, {{ this.earliestTrain["Direction"][0] }}, {{ this.earliestTime * -1 }} mins early