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