regexp to check for error message

This commit is contained in:
Moriz Wahl 2022-03-23 16:11:19 +01:00
parent ca0d97c47c
commit 40520c6718

View File

@ -104,7 +104,11 @@ export default {
})
.catch((error) => {
this.toastError(error.message)
if (error.message.includes('Code is older than 10 minutes'))
if (
error.message.match(
/email was sent more than ([0-9]+ hours)?( and)?([0-9]+ minutes)? ago/,
)
)
this.$router.push('/forgot-password/resetPassword')
})
},