Skip to content

Commit

Permalink
fix: update session on callback only when success
Browse files Browse the repository at this point in the history
  • Loading branch information
marnixdessing committed Mar 15, 2023
1 parent 6facd4e commit 2b3f24d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/callback/callbackRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ async function handleLoggedinRequest(session: Session, params: any) {

// Log the issue event
await registerIssueEvent(bsn, gemeente, success, timestamp, error);
await updateSessionStatus(session, bsn);
if(success){
// Only disable the session if the issueing was successful.
await updateSessionStatus(session, bsn);
}
return Response.json({ message: 'success' });
}

Expand Down

0 comments on commit 2b3f24d

Please sign in to comment.