Skip to content

Commit

Permalink
refactor : comment domain 구조 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
gurwls0122 committed May 23, 2024
1 parent 3332e68 commit cc9c9df
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ public class CommentWriteService {
public void create(Member member, Board board, CommentRequestDto commentRequestDto) {
Comment comment = commentRequestDto.toEntity(member, board);
commentRepository.save(comment);
board.increaseHit();
}

public void delete(Comment comment) {
commentRepository.delete(comment);
}

public void deleteByBoardId(Long boardId){
public void deleteByBoardId(Long boardId) {
commentRepository.deleteAllByBoardId(boardId);
}
}

0 comments on commit cc9c9df

Please sign in to comment.