Skip to content

Commit

Permalink
fix: modify modeFilter and orderFilter setting
Browse files Browse the repository at this point in the history
  • Loading branch information
giulia-tremolada committed Apr 19, 2024
1 parent d0c7624 commit 5b43edc
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,10 @@ public ResponseEntity<List<DelegationResource>> getDelegationsUsingTo(@ApiParam(
@RequestParam(name = "size", required = false) Integer size) {
log.trace("getDelegationsUsingTo start");
log.debug("getDelegationsUsingTo institutionId = {}, institutionDto{}", institutionId, productId);
String modeFilter = null;
String orderFilter = null;
if(Objects.nonNull(mode)){
modeFilter = mode.name();
}
if(Objects.nonNull(order)){
orderFilter = order.name();
}

String modeFilter = Objects.isNull(mode) ? null : mode.name();
String orderFilter = Objects.isNull(order) ? null : order.name();

ResponseEntity<List<DelegationResource>> result = ResponseEntity.status(HttpStatus.OK).body(delegationService.getDelegations(null, institutionId, productId, search, taxCode, modeFilter, orderFilter, page, size).stream()
.map(delegationMapper::toDelegationResource)
.collect(Collectors.toList()));
Expand Down

0 comments on commit 5b43edc

Please sign in to comment.