Skip to content

Commit

Permalink
Merge pull request #103 from Kusitms-29th-ASAP/fix/#102-classroom-ann…
Browse files Browse the repository at this point in the history
…ouncement

fix: #102 알림장 날짜 정렬
  • Loading branch information
sominyun authored Jun 4, 2024
2 parents 14fb2ae + a61cd84 commit aff11c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import org.springframework.data.jpa.repository.JpaRepository
interface ClassroomAnnouncementRepository: JpaRepository<ClassroomAnnouncement,Long> {
fun findTopByClassroomIdOrderByCreatedAtDesc(classroomId : Long) : ClassroomAnnouncement?

fun findAllByClassroomId(classroomId : Long) : List<ClassroomAnnouncement>
fun findAllByClassroomIdOrderByCreatedAtDesc(classroomId : Long) : List<ClassroomAnnouncement>
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ClassroomAnnouncementReader(
}

fun findAllByClassroomId(classroomId: Long): List<ClassroomAnnouncement> {
return classroomAnnouncementRepository.findAllByClassroomId(classroomId)
return classroomAnnouncementRepository.findAllByClassroomIdOrderByCreatedAtDesc(classroomId)
}

fun findById(classroomAnnouncementId: Long) : ClassroomAnnouncement {
Expand Down

0 comments on commit aff11c6

Please sign in to comment.