Skip to content

Commit

Permalink
feat: 검증 조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmondBreez3 committed Sep 4, 2024
1 parent ecc211c commit 5b256d2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ private void validateStudyMentorAuthorization(Member member, StudyDetail studyDe
}
}

private void validateDeadLine(LocalDateTime deadline, LocalDateTime curriculumStartDate) {
if (deadline.isBefore(curriculumStartDate)) {
private void validateDeadLine(LocalDateTime deadline, LocalDateTime studyStartDate) {
if (deadline.isBefore(LocalDateTime.now())) {
throw new CustomException(ASSIGNMENT_DEADLINE_INVALID);
}

if (deadline.isBefore(studyStartDate)) {
throw new CustomException(ASSIGNMENT_DEADLINE_INVALID);
}
}
Expand Down

0 comments on commit 5b256d2

Please sign in to comment.