Changed the Login error handling so that we get the no-account message in case of a specific error, else we send the user to /reset/login

This commit is contained in:
elweyn 2021-12-07 10:19:29 +01:00
parent 963d7de628
commit c7fbb9b0bf
2 changed files with 1 additions and 2 deletions

View File

@ -199,7 +199,6 @@ export class UserResolver {
throw new Error('No user with this credentials')
})
if (!loginUser.emailChecked) {
// TODO we want to catch this on the frontend and ask the user to check his emails or resend code
throw new Error('User email not validated')
}
if (loginUser.password === BigInt(0)) {

View File

@ -105,7 +105,7 @@ export default {
loader.hide()
})
.catch((error) => {
if (!error.message.includes('User email not validated')) {
if (error.message.includes('No user with this credentials')) {
this.$toasted.error(this.$t('error.no-account'))
} else {
// : this.$t('error.no-email-verify')