Skip to content

Commit

Permalink
[COT-114] Feature: 세션 수정 시 출석시간 유효성 검사 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
gikhoon authored Dec 19, 2024
1 parent 38c19c9 commit a494259
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.cotato.csquiz.domain.attendance.repository.AttendanceRepository;
import org.cotato.csquiz.domain.attendance.service.AttendanceService;
import org.cotato.csquiz.domain.attendance.service.component.AttendanceReader;
import org.cotato.csquiz.domain.attendance.util.AttendanceUtil;
import org.cotato.csquiz.domain.education.entity.Education;
import org.cotato.csquiz.domain.education.service.EducationService;
import org.cotato.csquiz.domain.generation.embedded.SessionContents;
Expand Down Expand Up @@ -116,6 +117,8 @@ public void updateSession(UpdateSessionRequest request) {
sessionRepository.save(session);

// Todo https://www.notion.so/youthhing/ApplicationEventPublisher-15887d592b6e803eb7c7c1ce2da22b8c?pvs=4
AttendanceUtil.validateAttendanceTime(request.sessionDateTime(), request.attendTime().attendanceDeadLine(),
request.attendTime().lateDeadLine());
Attendance attendance = attendanceReader.findBySessionIdWithPessimisticXLock(session.getId())
.orElseGet(() -> Attendance.builder()
.session(session)
Expand Down

0 comments on commit a494259

Please sign in to comment.