Skip to content

Commit

Permalink
Add missing sort options in LibraryService
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorin95670 committed Sep 26, 2024
1 parent b8b6870 commit 4af6c34
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,15 @@ public Page<Library> findAll(final User user, final Map<String, String> immutabl

return userLibraryViewRepository.findAll(
new SpecificationHelper<>(UserLibraryView.class, filters),
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize())
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), pageable.getSort())
).map(new UserLibraryViewToLibraryFunction());
}

@Override
public Page<LibraryTemplate> findAllTemplates(final Map<String, String> filters, final Pageable pageable) {
return libraryTemplateRepository.findAll(
new SpecificationHelper<>(LibraryTemplate.class, filters),
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize())
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), pageable.getSort())
);
}

Expand All @@ -372,7 +372,7 @@ public Page<LibraryTemplate> findAllTemplates(final User user,
return userLibraryTemplateViewRepository.findAllByUserId(
user.getId(),
new SpecificationHelper<>(UserLibraryTemplateView.class, filters),
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize())
PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), pageable.getSort())
).map(new UserLibraryTemplateViewToLibraryTemplateFunction());
}

Expand Down

0 comments on commit 4af6c34

Please sign in to comment.