Changes coming from new changes added in here.

This commit is contained in:
elweyn 2022-03-11 08:45:31 +01:00
parent af3c8a4e36
commit a4aabfc369
3 changed files with 6 additions and 4 deletions

View File

@ -107,8 +107,10 @@ export default {
.catch((error) => {
this.toastError(this.$t('error.no-account'))
if (error.message.includes('User email not validated')) {
this.$store.commit('email', this.form.email)
this.$router.push('/thx/login')
} else if (error.message.includes('User has no password set yet')) {
this.$store.commit('email', this.form.email)
this.$router.push('/reset-password/login')
}
loader.hide()

View File

@ -102,8 +102,8 @@ describe('Thx', () => {
expect(wrapper.find('a.btn').text()).toBe('settings.password.reset')
})
it('links the redirect button to /password', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/password')
it('links the redirect button to /forgot-password', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/forgot-password')
})
})
})

View File

@ -46,13 +46,13 @@ const textFields = {
headline: 'site.thx.errorTitle',
subtitle: 'site.thx.activateEmail',
button: 'settings.password.reset',
linkTo: '/password',
linkTo: '/forgot-password',
},
resetFailed: {
headline: 'site.thx.errorTitle',
subtitle: 'site.thx.resetPassword',
button: 'settings.password.reset',
linkTo: '/password',
linkTo: '/forgot-password',
},
}