From fcac0f7ef91e31df4a7019c8cb7b86efdc267a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 12 Oct 2022 15:14:43 +0200 Subject: [PATCH] Fix incorrect json structure --- .../Private/Assets/js/myep/Login.vue | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Login.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Login.vue index 190613bc..68ece2b7 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Login.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/Login.vue @@ -113,32 +113,32 @@ } this.resetPassword(this.email) .then(response => { - this.email = ''; - if (response.data.success) { + this.email = ''; + if (response.success) { + this.alert({ + message: 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.', + success: true, + }) + } else { + this.alert({ + message: 'Diese E-Mail Adresse konnte nicht gefunden werden.', + success: false, + }) + } + }).catch(error => { this.alert({ - message: 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.', - success: true, - }) - } else { - this.alert({ - message: 'Diese E-Mail Adresse konnte nicht gefunden werden.', + message: 'Bitte überprüfe deine Eingaben.', success: false, }) - } - }).catch(error => { - this.alert({ - message: 'Bitte überprüfe deine Eingaben.', - success: false, - }); - const violations = error.response.data.violations; - if (typeof violations !== 'undefined') { - for (let violation of violations) { - this.$set(this.formErrors, violation.property_path, violation.message); + const violations = error.response.data.violations; + if (typeof violations !== 'undefined') { + for (let violation of violations) { + this.$set(this.formErrors, violation.property_path, violation.message); + } } - } - }).finally(() => { - this.$emit('loaded') - }) + }).finally(() => { + this.$emit('loaded') + }) } }, computed: {