Skip to content

Commit

Permalink
Merge pull request #1169 from BCSDLab/hotfix/timetable-lecture-class-…
Browse files Browse the repository at this point in the history
…time

hotfix: timetableV2 온라인 강의 응답 오류 수정 (develop)
  • Loading branch information
Soundbar91 authored Jan 14, 2025
2 parents 7a5698c + 2a89f34 commit ce8690d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

Expand Down Expand Up @@ -80,6 +81,11 @@ public record ClassInfo(
String classPlace
) {
public static List<ClassInfo> of(String classTime, String classPlace) {
// 온라인 강의인 경우
if (Objects.equals(classTime, "[]")) {
return Collections.emptyList();
}

// 강의 장소가 없는 경우 강의 시간과 매핑을 못하기 때문에 바로 반환
if (classPlace == null) {
return List.of(new ClassInfo(parseClassTimes(classTime), null));
Expand Down

0 comments on commit ce8690d

Please sign in to comment.