change frorntend for new API call

This commit is contained in:
Moriz Wahl 2021-06-17 13:17:04 +02:00
parent 5078d80862
commit 56153893e8
3 changed files with 10 additions and 1 deletions

View File

@ -106,7 +106,7 @@ const loginAPI = {
'User.password': password,
},
}
return apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload)
return apiPost(CONFIG.LOGIN_API_URL + 'resetPassword', payload)
},
changePasswordProfile: async (sessionId, email, password, passwordNew) => {
const payload = {

View File

@ -56,6 +56,11 @@ describe('ResetPassword', () => {
$router: {
push: routerPushMock,
},
$loading: {
show: jest.fn(() => {
return { hide: jest.fn() }
}),
},
}
const stubs = {

View File

@ -154,6 +154,9 @@ export default {
}
},
async authenticate() {
const loader = this.$loading.show({
container: this.$refs.submitButton,
})
const optin = this.$route.params.optin
const result = await loginAPI.loginViaEmailVerificationCode(optin)
if (result.success) {
@ -163,6 +166,7 @@ export default {
} else {
this.$toast.error(result.result.message)
}
loader.hide()
},
},
computed: {