Skip to content

Commit

Permalink
refactor: 메서드 명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Jul 18, 2024
1 parent b31d258 commit 009ea99
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public ResponseNotice getNoticeById(Long id) throws TypeNotMatchException {
@Transactional
public void updateNotice(Long noticeId, RequestNotice requestNotice, Long userId) throws BusinessLogicException {
// 공지사항을 생성한 사용자인지 확인
Event oldEvent = validateEventOwner(noticeId, userId);
Event oldEvent = validateNoticeOwner(noticeId, userId);

// 해당 일정의 상태가 NOTICE 인지 확인
if(oldEvent.getType().equals(Type.NOTICE)) {
Expand All @@ -77,7 +77,7 @@ public void updateNotice(Long noticeId, RequestNotice requestNotice, Long userId
@Transactional
public void deleteNotice(Long noticeId, Long userId) throws BusinessLogicException {
// 공지사항을 생성한 사용자인지 확인
Event oldEvent = validateEventOwner(noticeId, userId);
Event oldEvent = validateNoticeOwner(noticeId, userId);

// 해당 일정의 상태가 NOTICE 인지 확인
if(oldEvent.getType().equals(Type.NOTICE)) {
Expand All @@ -88,7 +88,7 @@ public void deleteNotice(Long noticeId, Long userId) throws BusinessLogicExcepti
}

// 해당 일정을 생성한 사용자와 같은지 검증
private Event validateEventOwner(Long eventId, Long userId) throws UserNotMatchException {
private Event validateNoticeOwner(Long eventId, Long userId) throws UserNotMatchException {
Event oldEvent = eventRepository.findById(eventId)
.orElseThrow(NoticeNotFoundException::new);

Expand Down

0 comments on commit 009ea99

Please sign in to comment.