From d9640e94bf1e823816e8465c6efbf1d216bf3a10 Mon Sep 17 00:00:00 2001 From: BeckaL Date: Wed, 22 May 2024 17:46:51 +0100 Subject: [PATCH] BAU: send isForcedPasswordReset in request to backend We had previously added this parameter to the interface, but not used it. In the backend, this controls whether we send the PASSWORD_RESET_INTERVENTION_COMPLETE audit event through, so this change should mean these events are being sent --- src/components/reset-password/reset-password-service.ts | 1 + .../reset-password/tests/reset-password-service.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/reset-password/reset-password-service.ts b/src/components/reset-password/reset-password-service.ts index cd113ac9ac..e972a336b3 100644 --- a/src/components/reset-password/reset-password-service.ts +++ b/src/components/reset-password/reset-password-service.ts @@ -25,6 +25,7 @@ export function resetPasswordService( API_ENDPOINTS.RESET_PASSWORD, { password: newPassword, + isForcedPasswordReset }, getInternalRequestConfigWithSecurityHeaders( { diff --git a/src/components/reset-password/tests/reset-password-service.test.ts b/src/components/reset-password/tests/reset-password-service.test.ts index 9727483095..e3dae07379 100644 --- a/src/components/reset-password/tests/reset-password-service.test.ts +++ b/src/components/reset-password/tests/reset-password-service.test.ts @@ -62,7 +62,7 @@ describe("reset password service", () => { const expectedApiCallDetails = { expectedPath: API_ENDPOINTS.RESET_PASSWORD, expectedHeaders: expectedHeadersFromCommonVarsWithSecurityHeaders, - expectedBody: { password: newPassword }, + expectedBody: { password: newPassword, isForcedPasswordReset: isForcedPasswordReset }, }; checkApiCallMadeWithExpectedBodyAndHeaders(