diff --git a/src/main/java/org/pingle/pingleserver/service/PinService.java b/src/main/java/org/pingle/pingleserver/service/PinService.java index b45bd6d..ddd361b 100644 --- a/src/main/java/org/pingle/pingleserver/service/PinService.java +++ b/src/main/java/org/pingle/pingleserver/service/PinService.java @@ -128,9 +128,9 @@ public List getMeetings(Long pinId, Long userId, MCategory cate List meetings; if (category == null){ - meetings = meetingRepository.findByPinIdAndStartAtAfter(pinId, LocalDateTime.now()); + meetings = meetingRepository.findByPinIdAndStartAtAfterOrderByStartAt(pinId, LocalDateTime.now()); } else { - meetings = meetingRepository.findByPinIdAndCategoryAndStartAtAfter(pinId, category, LocalDateTime.now()); + meetings = meetingRepository.findByPinIdAndCategoryAndStartAtAfterOrderByStartAt(pinId, category, LocalDateTime.now()); } return meetings.stream() .map(meeting -> MeetingResponse.of(meeting, getOwnerName(meeting), getCurParticipants(meeting),