From e7d4e423c3865dd1f1ad99507d8d88cb364b12b2 Mon Sep 17 00:00:00 2001 From: Ali-D-Akbar Date: Fri, 9 Apr 2021 17:03:20 +0500 Subject: [PATCH] fix: add email form data --- src/users/data/api.js | 5 +---- src/users/data/api.test.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/users/data/api.js b/src/users/data/api.js index 88ef3f889..6950af861 100644 --- a/src/users/data/api.js +++ b/src/users/data/api.js @@ -335,10 +335,7 @@ export async function postTogglePasswordStatus(user, comment) { export async function postResetPassword(email) { const { data } = await getAuthenticatedHttpClient().post( - `${getConfig().LMS_BASE_URL}/account/password`, - { - email, - }, + `${getConfig().LMS_BASE_URL}/account/password`, `email_from_support_tools=${email}`, ); return data; } diff --git a/src/users/data/api.test.js b/src/users/data/api.test.js index feb2c2ba4..c91711b90 100644 --- a/src/users/data/api.test.js +++ b/src/users/data/api.test.js @@ -309,7 +309,7 @@ describe('API', () => { it('Reset Password Response', async () => { const expectedResponse = { }; - mockAdapter.onPost(resetPasswordApiUrl, { email: testEmail }).reply(200, expectedResponse); + mockAdapter.onPost(resetPasswordApiUrl, `email_from_support_tools=${testEmail}`).reply(200, expectedResponse); const response = await api.postResetPassword(testEmail); expect(response).toEqual(expectedResponse); });