Skip to content

Commit

Permalink
Merge pull request #342 from Team-Sopetit/fix/#305-add-routine-sort
Browse files Browse the repository at this point in the history
[FIX] 진행 중인 루틴 정렬 추가
  • Loading branch information
thguss authored Sep 19, 2024
2 parents 12638c9 + 8abc4e2 commit 5bd6ecf
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.soptie.server.api.controller.dto.response.memberroutine;

import java.util.Comparator;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -53,6 +54,7 @@ public static MemberRoutinesResponse of(Theme theme, Map<Routine, MemberRoutine>
private static List<MemberRoutineResponse> toRoutines(Map<Routine, MemberRoutine> routinesByMember) {
return routinesByMember.entrySet().stream()
.map(entry -> MemberRoutineResponse.of(entry.getKey(), entry.getValue()))
.sorted(Comparator.comparingLong(MemberRoutineResponse::routineId))
.toList();
}

Expand Down

0 comments on commit 5bd6ecf

Please sign in to comment.