diff --git a/frontend/src/apis/loginAPI.js b/frontend/src/apis/loginAPI.js index 5b55d3a5b..a1befd58a 100644 --- a/frontend/src/apis/loginAPI.js +++ b/frontend/src/apis/loginAPI.js @@ -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 = { diff --git a/frontend/src/views/Pages/ResetPassword.spec.js b/frontend/src/views/Pages/ResetPassword.spec.js index 261a1a0c0..14038e676 100644 --- a/frontend/src/views/Pages/ResetPassword.spec.js +++ b/frontend/src/views/Pages/ResetPassword.spec.js @@ -56,6 +56,11 @@ describe('ResetPassword', () => { $router: { push: routerPushMock, }, + $loading: { + show: jest.fn(() => { + return { hide: jest.fn() } + }), + }, } const stubs = { diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index 1e1192976..1f1cbdbc0 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -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: {