From 4784c3dd4f2b73853a90adea56be4ebefa59699f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 10 Jan 2025 16:52:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=98=A8=EB=9D=BC=EC=9D=B8=20?= =?UTF-8?q?=EC=A0=95=EA=B7=9C=20=EA=B0=95=EC=9D=98=20classInfo=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../timetableV2/dto/response/TimetableLectureResponse.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java index e55bbe476..148e2ce58 100644 --- a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java +++ b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Objects; @@ -82,6 +83,10 @@ public record ClassInfo( public static List of(String classTime, String classPlace) { // 강의 장소가 없는 경우 강의 시간과 매핑을 못하기 때문에 바로 반환 if (classPlace == null) { + // 온라인 강의인 경우 + if (classTime.equals("[]")) { + return Collections.emptyList(); + } return List.of(new ClassInfo(parseClassTimes(classTime), null)); } From 2a89f34364eeed163ea2e846d7bad5afe6188a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=A0=EA=B4=80=EA=B7=9C?= Date: Fri, 10 Jan 2025 17:17:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=EC=BD=94=EB=93=9C=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/response/TimetableLectureResponse.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java index 148e2ce58..5dad21437 100644 --- a/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java +++ b/src/main/java/in/koreatech/koin/domain/timetableV2/dto/response/TimetableLectureResponse.java @@ -81,12 +81,13 @@ public record ClassInfo( String classPlace ) { public static List of(String classTime, String classPlace) { + // 온라인 강의인 경우 + if (Objects.equals(classTime, "[]")) { + return Collections.emptyList(); + } + // 강의 장소가 없는 경우 강의 시간과 매핑을 못하기 때문에 바로 반환 if (classPlace == null) { - // 온라인 강의인 경우 - if (classTime.equals("[]")) { - return Collections.emptyList(); - } return List.of(new ClassInfo(parseClassTimes(classTime), null)); }