Added saving cities to firestore
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user