Skip to content

Commit

Permalink
포토북 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
HyungJu committed Sep 21, 2024
1 parent 6f2e7f4 commit 737586b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class LikeService(
) {
fun getAllLikedTourAreaIdsByMember(memberId: Long): List<Long> {
val likes = likeRepository.findAllByMemberId(memberId)
return likes.filter { it.tourAreaId != null }.map { it.tourAreaId!! }
return likes.sortedByDescending { it.id }.filter { it.tourAreaId != null }.map { it.tourAreaId!! }
}

fun getAllLikedLaneIdsByMember(memberId: Long): List<Long> {
val likes = likeRepository.findAllByMemberId(memberId)
return likes.filter { it.laneId != null }.map { it.laneId!! }
return likes.sortedByDescending { it.id }.filter { it.laneId != null }.map { it.laneId!! }
}

@Transactional
Expand Down

0 comments on commit 737586b

Please sign in to comment.