Skip to content

Commit

Permalink
Merge pull request #191 from tipi-tapi/hotfix/191
Browse files Browse the repository at this point in the history
์ผ๊ธฐ ์ƒ์„ฑ ์‹œ ์˜ค๋Š˜ ๋‚ ์งœ์˜ ์ผ๊ธฐ๊ฐ€ ์—†์„ ๋•Œ๋งŒ ์ผ๊ธฐ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •
  • Loading branch information
choihuk authored Aug 15, 2023
2 parents c7aa069 + feb3334 commit 705997b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public Diary validateDiaryById(Long diaryId, User user) {
}

public void validateExistsByDate(Long userId, LocalDate diaryDate) {
diaryRepository.getDiaryExistsByDiaryDate(userId, diaryDate)
.orElseThrow(DiaryDateAlreadyExistsException::new);
if (diaryRepository.getDiaryExistsByDiaryDate(userId, diaryDate).isPresent()) {
throw new DiaryDateAlreadyExistsException();
}
}

private void ownedByUser(Diary diary, User user) {
Expand Down

0 comments on commit 705997b

Please sign in to comment.