From 448bfeaceb47867b59fc1b1b2e5cd79b1d944000 Mon Sep 17 00:00:00 2001 From: Choi YoungLyn Date: Tue, 4 Jun 2024 21:39:41 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#288=20-=20=EC=86=8C=EC=85=9C=20KR=20?= =?UTF-8?q?=EC=A4=91=EB=B3=B5=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../objective/dto/response/social/SocialKeyResultDto.java | 2 +- .../objective/dto/response/social/SocialObjectiveDto.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialKeyResultDto.java b/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialKeyResultDto.java index 25607e8..69dd669 100644 --- a/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialKeyResultDto.java +++ b/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialKeyResultDto.java @@ -28,7 +28,7 @@ private static SocialKeyResultDto getSocialKeyResultDto(KeyResult keyResult) { keyResult.getIdx(), keyResult.getTarget(), keyResult.getMetric(), - keyResult.getTaskList().stream().map(SocialTaskDto::of).toList() + keyResult.getTaskList().stream().distinct().map(SocialTaskDto::of).toList() ); } } diff --git a/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialObjectiveDto.java b/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialObjectiveDto.java index d7bcebc..ad7e0f6 100644 --- a/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialObjectiveDto.java +++ b/moonshot-api/src/main/java/org/moonshot/objective/dto/response/social/SocialObjectiveDto.java @@ -20,7 +20,7 @@ public static SocialObjectiveDto of(Objective objective) { objective.getContent(), objective.getPeriod().getStartAt().format(DateTimeFormatter.ISO_LOCAL_DATE), objective.getPeriod().getExpireAt().format(DateTimeFormatter.ISO_LOCAL_DATE), - objective.getKeyResultList().stream().map(SocialKeyResultDto::of).toList() + objective.getKeyResultList().stream().distinct().map(SocialKeyResultDto::of).toList() ); } }