Skip to content

Commit

Permalink
Update ExternalDataApiV1Controller.java
Browse files Browse the repository at this point in the history
The timestamp in the storeExternalBulk function should be within the interval.
  • Loading branch information
alireza-dhp authored Oct 14, 2024
1 parent 624bf12 commit 7d3a450
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ResponseEntity<Void> storeExternalBulk(String moreApiToken, EndpointDataB

endpointDataBulkDTO.getDataPoints().stream()
.map(ExternalDataDTO::getTimestamp)
.map(timestamp -> timestamp.isBefore(interval.getStart()) || timestamp.isAfter(interval.getEnd()))
.map(timestamp -> !(timestamp.isBefore(interval.getStart()) || timestamp.isAfter(interval.getEnd())))
.filter(v -> v)
.findFirst()
.orElseThrow(BadRequestException::TimeFrame);
Expand Down

0 comments on commit 7d3a450

Please sign in to comment.