From 8b15d9136ef4bffefa87d173d342f077fc3d91ca Mon Sep 17 00:00:00 2001 From: Felix Dittrich <31076102+f11h@users.noreply.github.com> Date: Mon, 10 Jan 2022 15:19:13 +0100 Subject: [PATCH] Change behaviour of If-Modified-Since to return only batches newer than given timestamp (#144) --- .../ec/dgc/gateway/repository/RevocationBatchRepository.java | 2 +- .../eu/europa/ec/dgc/gateway/service/RevocationListService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/europa/ec/dgc/gateway/repository/RevocationBatchRepository.java b/src/main/java/eu/europa/ec/dgc/gateway/repository/RevocationBatchRepository.java index 40d02b10..41bd4b6d 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/repository/RevocationBatchRepository.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/repository/RevocationBatchRepository.java @@ -57,6 +57,6 @@ public interface RevocationBatchRepository extends JpaRepository getAllByChangedGreaterThanEqualOrderByChangedAsc(ZonedDateTime date, Pageable page); + List getAllByChangedGreaterThanOrderByChangedAsc(ZonedDateTime date, Pageable page); } diff --git a/src/main/java/eu/europa/ec/dgc/gateway/service/RevocationListService.java b/src/main/java/eu/europa/ec/dgc/gateway/service/RevocationListService.java index a5e4df22..5832c6ec 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/service/RevocationListService.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/service/RevocationListService.java @@ -198,7 +198,7 @@ public RevocationBatchList getRevocationBatchList(ZonedDateTime thresholdDate) { RevocationBatchList batchList = new RevocationBatchList(); List entityList = - revocationBatchRepository.getAllByChangedGreaterThanEqualOrderByChangedAsc( + revocationBatchRepository.getAllByChangedGreaterThanOrderByChangedAsc( thresholdDate, PageRequest.ofSize(MAX_BATCH_LIST_SIZE + 1)); batchList.setMore(entityList.size() > MAX_BATCH_LIST_SIZE);