feat: Lecture 내 강의 조회 수정

This commit is contained in:
kgc91747 2024-08-05 15:35:11 +09:00
parent e224f0096b
commit 09d86ebcdf

View File

@ -205,6 +205,7 @@ public class LectureServiceImpl implements LectureService {
for (Registration registration : registrationList) { for (Registration registration : registrationList) {
Lecture lecture = registration.getLecture(); Lecture lecture = registration.getLecture();
if (registration.getStatus() == RegistrationStatus.ACCEPTED) {
LectureSearchResponse lectureSearchResponse = LectureSearchResponse.builder() LectureSearchResponse lectureSearchResponse = LectureSearchResponse.builder()
.id(lecture.getId()) .id(lecture.getId())
.title(lecture.getTitle()) .title(lecture.getTitle())
@ -213,6 +214,7 @@ public class LectureServiceImpl implements LectureService {
myLectureList.add(lectureSearchResponse); myLectureList.add(lectureSearchResponse);
} }
} }
}
return myLectureList; return myLectureList;
} }
@ -235,12 +237,9 @@ public class LectureServiceImpl implements LectureService {
Lecture l; Lecture l;
l = lecture.get(); l = lecture.get();
if(l.isOnline()) if (l.isOnline()) {
{
l.setOnline(false); l.setOnline(false);
} } else {
else
{
l.setOnline(true); l.setOnline(true);
} }