Show message in case email is not registered
This commit is contained in:
@@ -124,8 +124,9 @@ export default new Vuex.Store({
|
||||
url: '/api/reset-password',
|
||||
data: formData,
|
||||
method: 'post'
|
||||
}).then(() => {
|
||||
}).then((response) => {
|
||||
commit('loadingFinish');
|
||||
return response;
|
||||
}).catch((error) => {
|
||||
commit('loadingFinish');
|
||||
throw error;
|
||||
|
||||
@@ -81,12 +81,19 @@
|
||||
}
|
||||
this.$store.dispatch('resetPassword',
|
||||
this.email
|
||||
).then(() => {
|
||||
).then((response) => {
|
||||
this.email = '';
|
||||
this.$store.commit('alert', {
|
||||
message: 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.',
|
||||
class: 'alert-success'
|
||||
});
|
||||
if (response.data.success) {
|
||||
this.$store.commit('alert', {
|
||||
message: 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.',
|
||||
class: 'alert-success'
|
||||
});
|
||||
} else {
|
||||
this.$store.commit('alert', {
|
||||
message: 'Diese E-Mail Adresse konnte nicht gefunden werden.',
|
||||
class: 'alert-danger'
|
||||
});
|
||||
}
|
||||
}).then(() => {
|
||||
EventBus.$emit('scrollTo', '#myep-main');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user