Skip to content

Commit

Permalink
Change behaviour of If-Modified-Since to return only batches newer th…
Browse files Browse the repository at this point in the history
…an given timestamp (#144)
  • Loading branch information
f11h authored Jan 10, 2022
1 parent 4bdbdd6 commit 8b15d91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ public interface RevocationBatchRepository extends JpaRepository<RevocationBatch
@Query("DELETE FROM RevocationBatchEntity r WHERE r.deleted = true AND r.changed < :threshold")
int deleteDeletedBatchesOlderThan(@Param("threshold") ZonedDateTime threshold);

List<RevocationBatchProjection> getAllByChangedGreaterThanEqualOrderByChangedAsc(ZonedDateTime date, Pageable page);
List<RevocationBatchProjection> getAllByChangedGreaterThanOrderByChangedAsc(ZonedDateTime date, Pageable page);

}
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public RevocationBatchList getRevocationBatchList(ZonedDateTime thresholdDate) {
RevocationBatchList batchList = new RevocationBatchList();

List<RevocationBatchProjection> entityList =
revocationBatchRepository.getAllByChangedGreaterThanEqualOrderByChangedAsc(
revocationBatchRepository.getAllByChangedGreaterThanOrderByChangedAsc(
thresholdDate, PageRequest.ofSize(MAX_BATCH_LIST_SIZE + 1));

batchList.setMore(entityList.size() > MAX_BATCH_LIST_SIZE);
Expand Down

0 comments on commit 8b15d91

Please sign in to comment.