Skip to content

Commit

Permalink
Merge pull request #107 from edx/aakbar/PROD-2337
Browse files Browse the repository at this point in the history
Fix Reset Password button
  • Loading branch information
Ali-D-Akbar authored Apr 12, 2021
2 parents 1ecdd01 + e7d4e42 commit 1d356ee
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 @@ -376,10 +376,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 @@ -312,7 +312,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 1d356ee

Please sign in to comment.