Implement Firebase emulator

This commit is contained in:
Conor McNamara
2023-02-22 21:20:26 +00:00
parent f42f58deb9
commit f837780e10
13 changed files with 1549 additions and 701 deletions

View File

@ -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("Error fetching data from the database");
response.send({data: "Error fetching data from the database"});
return;
}
// iterate through each of the collection's documents