From b50195994a4c088028a1ca2679c21eadcd71dd2b Mon Sep 17 00:00:00 2001 From: Kamil Klecha Date: Mon, 18 Oct 2021 20:31:46 +0200 Subject: [PATCH] Added saving cities to firestore --- src/views/Forecast.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Forecast.vue b/src/views/Forecast.vue index 29d032e..40abbbc 100644 --- a/src/views/Forecast.vue +++ b/src/views/Forecast.vue @@ -66,8 +66,8 @@ export default class Forecast extends Vue { } private addCity(city: object) { - console.log(city); this.$data.cities.push(city); + this.saveUser(); } private async getFirebaseUserData() { @@ -83,7 +83,7 @@ export default class Forecast extends Vue { } } - private async saveUser(id: string) { + private async saveUser(id: string = this.$data.dataID) { if (this.$data.dataID === undefined) { this.$data.dataID = id; }