Skip to content

Commit

Permalink
[fix] add order query in meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
tkdwns414 committed Jan 14, 2024
1 parent 9ca0f44 commit c5bc2f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/pingle/pingleserver/service/PinService.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public List<MeetingResponse> getMeetings(Long pinId, Long userId, MCategory cate
List<Meeting> 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),
Expand Down

0 comments on commit c5bc2f1

Please sign in to comment.