Fix login error messages

This commit is contained in:
Christian Cueni 2020-04-30 14:17:56 +02:00
parent e147ca65e0
commit fd619ab47b
2 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,6 @@ export default {
if (response.data) {
redirectRouteName = 'registration';
}
this.$apollo.mutate({
mutation: HELLO_EMAIL_MUTATION,
variables: {

View File

@ -59,7 +59,6 @@ export default {
}
})
.catch((error) => {
console.log(error)
if (error.response.data.message && error.response.data.message === 'Sie haben sich nicht korrekt eingeloggt oder Ihr Konto ist vor\u00fcbergehend deaktiviert.') {
this.passwordErrors = ['Sie haben sich nicht korrekt eingeloggt oder Ihr Konto ist vorübergehend deaktiviert.'];
} else {
@ -97,8 +96,7 @@ export default {
}
}
} catch (e) {
console.warn(e);
that.loginError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.';
that.passwordErrors = ['Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.'];
}
}
})
@ -106,7 +104,10 @@ export default {
const firstError = errors.graphQLErrors[0];
switch (firstError.message) {
case 'invalid_credentials':
that.loginError = 'Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.';
that.passwordErrors = ['Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.'];
break;
case 'email_not_verified':
that.passwordErrors = ['Bitte verifiziere zuerst deine E-Mail.'];
break;
case 'no_valid_license':
this.$router.push({name: 'licenseActivation'})