Added saving cities to firestore

This commit is contained in:
Kamil Klecha
2021-10-18 20:31:46 +02:00
parent 3df6035642
commit b50195994a

View File

@@ -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;
}