Skip to content

Commit

Permalink
♻️ Refactor: lectureId valueOf 타입 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
yxhwxn committed Jun 10, 2024
1 parent c97e406 commit b05a893
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/khu/bigdata/infou/implement/LectureService.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public LectureResponseDTO.LectureDetailDto findLectureDetail(Integer lectureId)
throw new IllegalArgumentException("LectureId must not be null");
}

LectureUdemy lectureUdemy = lectureUdemyRepository.findById(lectureId)
LectureUdemy lectureUdemy = lectureUdemyRepository.findByLectureId(Long.valueOf(lectureId))
.orElseThrow(() -> new IllegalArgumentException("Lecture not found"));
LectureDetail lectureDetail = lectureDetailRepository.findByLectureUdemy(lectureUdemy)
LectureDetail lectureDetail = lectureDetailRepository.findByLectureId(Long.valueOf(lectureId))
.orElseThrow(() -> new IllegalArgumentException("Lecture detail not found"));

return LectureConverter.toLectureDetailDto(lectureUdemy, lectureDetail);
Expand All @@ -85,8 +85,4 @@ public LectureResponseDTO.OtherLectureListDto findOtherLectureList() {
return null;
}


public LectureResponseDTO.StudentTopwordDto findStudentTopword() {
return null;
}
}

0 comments on commit b05a893

Please sign in to comment.