Skip to content

Commit

Permalink
[FEAT][390] - Addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lucifercr07 committed Jun 10, 2024
1 parent 1c41a42 commit 423a171
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ public void cleanNonConfirmedUsers(final Date date) {
ms -= nonConfirmedUsersCleanupDelay;
Date d = new Date(ms);

List<User> users = userRepo.findByConfirmedIsFalse().stream()
.filter(user -> (user.getDates() != null && user.getDates().getCreationDate().before(d)))
.toList();
List<User> users = userRepo.findByConfirmedIsFalseAndDatesCreationDateBefore(d);

userRepo.deleteAll(users);
userRepo.flush();
Expand Down

0 comments on commit 423a171

Please sign in to comment.