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 5b256d2 commit 8b63077
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ private void validateStudyMentorAuthorization(Member member, StudyDetail studyDe
}

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

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

0 comments on commit 8b63077

Please sign in to comment.