diff --git a/functions/index.js b/functions/index.js index 3226245..b9dff0e 100644 --- a/functions/index.js +++ b/functions/index.js @@ -49,8 +49,8 @@ exports.postStationData = functions.https.onRequest((request, response) => { cors(request, response, () => { var batchWrite = db.batch(); jsonData.forEach((doc) => { - // append if the dartCodes hashset is empty or the current station is not present - if (dartCodes.size == 0 || !dartCodes.has(doc["StationCode"][0])) { + // append if the dartCodes hashset is empty or the current station is not present, and ignoring positions of zero + if ((dartCodes.size == 0 || !dartCodes.has(doc["StationCode"][0])) && !(doc["StationLongitude"] == 0 || doc["StationLatitude"] == 0)) { doc["StationType"] = [stationTypeCode] var docID = db.collection('stations').doc(doc["StationCode"][0]) batchWrite.set(docID, doc); diff --git a/src/pages/AccountPage.vue b/src/pages/AccountPage.vue index 09374ae..3f7654a 100644 --- a/src/pages/AccountPage.vue +++ b/src/pages/AccountPage.vue @@ -56,15 +56,6 @@ export default { created() { this.user = auth.currentUser - const functions = getFunctions(app) - let host = window.location.hostname - if (host === '127.0.0.1' || host === 'localhost') { - connectFunctionsEmulator(functions, host, 5001); - } - const secureFunction = httpsCallable(functions, 'securefunction') - secureFunction().then((response) => { - console.log(response); - }) }, methods: { diff --git a/src/pages/LoginPage.vue b/src/pages/LoginPage.vue index 3cdd96f..caca59c 100644 --- a/src/pages/LoginPage.vue +++ b/src/pages/LoginPage.vue @@ -60,7 +60,7 @@ export default { signInWithEmailAndPassword(auth, this.email, this.password) .then((userCredential) => { const user = userCredential.user - this.$router.push({path:'/account'}) + this.$router.push({path:'/'}) }) .catch((error) => { this.FirebaseError = error.message diff --git a/src/pages/MapPage.vue b/src/pages/MapPage.vue index 51dacc0..1f2e63d 100644 --- a/src/pages/MapPage.vue +++ b/src/pages/MapPage.vue @@ -45,7 +45,7 @@