From 8abc4e2018a4f755db55e24f31c9d0368bd74c72 Mon Sep 17 00:00:00 2001 From: thguss Date: Mon, 2 Sep 2024 16:26:28 +0900 Subject: [PATCH] [ADD] added sorting filter --- .../dto/response/memberroutine/GetMemberRoutinesResponse.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/soptie/server/api/controller/dto/response/memberroutine/GetMemberRoutinesResponse.java b/src/main/java/com/soptie/server/api/controller/dto/response/memberroutine/GetMemberRoutinesResponse.java index a1169150..5894d4b6 100644 --- a/src/main/java/com/soptie/server/api/controller/dto/response/memberroutine/GetMemberRoutinesResponse.java +++ b/src/main/java/com/soptie/server/api/controller/dto/response/memberroutine/GetMemberRoutinesResponse.java @@ -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; @@ -53,6 +54,7 @@ public static MemberRoutinesResponse of(Theme theme, Map private static List toRoutines(Map routinesByMember) { return routinesByMember.entrySet().stream() .map(entry -> MemberRoutineResponse.of(entry.getKey(), entry.getValue())) + .sorted(Comparator.comparingLong(MemberRoutineResponse::routineId)) .toList(); }