Skip to content

Commit 5b1b01b

Browse files
committed
order notes table by service name asc and last modified desc
1 parent ca05aae commit 5b1b01b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/edu/tamu/app/controller/NoteController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public ApiResponse remove(@ApiValidatedModel Note note) {
6464
@ApiMapping("/page")
6565
@Auth(role = "ROLE_ANONYMOUS")
6666
public ApiResponse page(@ApiData FilteredPageRequest filteredPageRequest) {
67-
return new ApiResponse(SUCCESS, noteRepo.findAllByOrderByLastModifiedDesc(filteredPageRequest.getPageRequest()));
67+
return new ApiResponse(SUCCESS, noteRepo.findAllByOrderByServiceNameAscLastModifiedDesc(filteredPageRequest.getPageRequest()));
6868
}
6969

7070
}

src/main/java/edu/tamu/app/model/repo/NoteRepo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public interface NoteRepo extends JpaRepository<Note, Long>, NoteRepoCustom, Jpa
1515

1616
public Page<Note> findAll(Specification<Note> specification, Pageable pageable);
1717

18-
public Page<Note> findAllByOrderByLastModifiedDesc(Pageable pageable);
18+
public Page<Note> findAllByOrderByServiceNameAscLastModifiedDesc(Pageable pageable);
1919

2020
public List<Note> findAllByServiceId(Long id);
2121

0 commit comments

Comments
 (0)