diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/_store.js b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/_store.js index 95cc2291..81e097f0 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/_store.js +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/_store.js @@ -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; diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/Login.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/Login.vue index 6d4e2c97..eb2e9eae 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/Login.vue +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/Login.vue @@ -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'); });