Skip to content

Commit

Permalink
Sort ontologies for ontologies tab
Browse files Browse the repository at this point in the history
  • Loading branch information
henrietteharmse committed Jul 13, 2024
1 parent 09d8251 commit 47538f8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.rest.webmvc.ResourceNotFoundException;
import org.springframework.data.web.PageableDefault;
import org.springframework.http.HttpEntity;
Expand Down Expand Up @@ -56,7 +57,7 @@ public HttpEntity<V2PagedAndFacetedResponse<V2Entity>> getAllOntologies(
Map<String, Collection<String>> properties = new HashMap<>();
properties.put("isObsolete", List.of("false"));

Pageable pageable = PageRequest.of(0, 1000);
Pageable pageable = PageRequest.of(0, 1000, Sort.by("ontologyId"));
allOntologiesResponse = new ResponseEntity<>(
new V2PagedAndFacetedResponse<>(
ontologyRepository.find(pageable, "en", null, null, null, false, DynamicQueryHelper.filterProperties(properties))
Expand Down

0 comments on commit 47538f8

Please sign in to comment.