Skip to content

Commit

Permalink
call postLoad in findAllByUsername and postPersist in create methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskabc committed Jul 18, 2024
1 parent 474e0af commit 0bd73d1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ public PasswordChangeRequest create(UserAccount userAccount) {
request.setCreatedAt(Instant.now());

passwordChangeRequestDao.persist(request);
postPersist(request);
return request;
}

public List<PasswordChangeRequest> findAllByUsername(String username) {
return passwordChangeRequestDao.findAllByUsername(username);
List<PasswordChangeRequest> loaded = passwordChangeRequestDao.findAllByUsername(username);
return loaded.stream().map(this::postLoad).toList();
}

@Override
Expand Down

0 comments on commit 0bd73d1

Please sign in to comment.