Skip to content

Commit

Permalink
fix: add email form data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-D-Akbar committed Apr 12, 2021
1 parent 0760f3d commit e7d4e42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/users/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/users/data/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit e7d4e42

Please sign in to comment.