location: display the error message in case of wrong phone number or email

This commit is contained in:
nobohan 2021-11-03 14:45:15 +01:00 committed by Julien Fastré
parent 4011fc6e77
commit a768563cd0

View File

@ -244,13 +244,20 @@ export default {
}
});
}
postLocation(body).then(location => new Promise(resolve => {
console.log('postLocation', location);
this.locations.push(location);
this.$store.dispatch('updateLocation', location);
resolve();
this.modal.showModal = false;
}));
postLocation(body)
.then(
location => new Promise(resolve => {
console.log('postLocation', location);
this.locations.push(location);
this.$store.dispatch('updateLocation', location);
resolve();
this.modal.showModal = false;
})
).catch(
err => {
this.errors.push(err.message);
}
);
};
},
submitNewAddress(payload) {