Skip to content

Commit

Permalink
[Chore] 코드 수정(#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed May 31, 2024
1 parent bd9d74c commit c048c8c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public Member findMemberById(final Long memberId) {
() -> new NotFoundException(ErrorMessage.MEMBER_NOT_FOUND));
}

@Transactional
public void deleteItem(final Long itemId) {

Item item = findItemById(itemId);
Expand All @@ -104,7 +105,7 @@ public void deleteItem(final Long itemId) {
} catch (IOException e) {
throw new RuntimeException("이미지 삭제 오류 발생", e);
}
itemRepository.delete(item);
itemRepository.deleteById(itemId);
}

public Item findItemById(final Long itemId) {
Expand Down

0 comments on commit c048c8c

Please sign in to comment.