- Timestamp:
- 10/07/21 20:22:23 (3 years ago)
- Branches:
- master
- Children:
- ee0e297
- Parents:
- 276a8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/charitable/services/DonationPostService.java
r276a8b6 r0c37625 54 54 } 55 55 56 public Page<DonationPost> findPaginated(int pageNo, int pageSize, String sort, String order ) {56 public Page<DonationPost> findPaginated(int pageNo, int pageSize, String sort, String order, boolean approved) { 57 57 Sort s = Sort.by(sort); 58 58 s = order.equals("asc") ? s.ascending() : s.descending(); 59 59 Pageable pageable = PageRequest.of(pageNo - 1, pageSize, s); 60 return donationPostRepository.findAllByApproved(pageable, true);60 return donationPostRepository.findAllByApproved(pageable, approved); 61 61 } 62 62 }
Note:
See TracChangeset
for help on using the changeset viewer.