Skip to content

Commit

Permalink
Merge pull request #357 from cap-md089/r-a303931/fix-password-reset-s…
Browse files Browse the repository at this point in the history
…essions

fix: fixed password reset sessions not changing
  • Loading branch information
r-a303931 committed May 27, 2023
2 parents 7bb7c87 + 699707e commit 29f504b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/server/src/api/member/passwordreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const func: Endpoint<Backends<[PAM.PAMBackend]>, api.member.PasswordReset
.addPasswordForUser([req.session.userAccount.username, req.body.password])
.flatMap<PasswordSetResult>(() =>
req.session.type === SessionType.PASSWORD_RESET
? backend.updateSession(req.session).map(always(PasswordSetResult.OK))
? backend
.updateSession({ ...req.session, type: SessionType.REGULAR })
.map(always(PasswordSetResult.OK))
: Either.right(PasswordSetResult.OK),
)
.map(wrapper),
Expand Down

0 comments on commit 29f504b

Please sign in to comment.