Fix incorrect json structure

This commit is contained in:
Björn Fromme
2022-10-12 15:14:43 +02:00
parent 57ab8836ae
commit fcac0f7ef9
@@ -113,32 +113,32 @@
} }
this.resetPassword(this.email) this.resetPassword(this.email)
.then(response => { .then(response => {
this.email = ''; this.email = '';
if (response.data.success) { 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({ this.alert({
message: 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.', message: 'Bitte überprüfe deine Eingaben.',
success: true,
})
} else {
this.alert({
message: 'Diese E-Mail Adresse konnte nicht gefunden werden.',
success: false, success: false,
}) })
} const violations = error.response.data.violations;
}).catch(error => { if (typeof violations !== 'undefined') {
this.alert({ for (let violation of violations) {
message: 'Bitte überprüfe deine Eingaben.', this.$set(this.formErrors, violation.property_path, violation.message);
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);
} }
} }).finally(() => {
}).finally(() => { this.$emit('loaded')
this.$emit('loaded') })
})
} }
}, },
computed: { computed: {