Skip to content

Commit

Permalink
Fix: 대댓글 삭제 시 투표 전체 댓글 수 감소하게 수정 (#182)
Browse files Browse the repository at this point in the history
* refactor: 대댓글 생성시 투표의 댓글 수 증가하게 변경

* fix: 대댓글 삭제 삭제시 투표 전체 댓글수 감소하게 변경
  • Loading branch information
kimJH47 authored Feb 23, 2024
1 parent 44fffbd commit 5b4bdc9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public void deleteComment(final Long memberId, final Long commentId) {
switch (comment.getCommentType()) {
case COMMENT:
commentRepository.deleteAllRepliesByParentCommentId(commentId);
voteRepository.decreaseCommentCount(comment.getVote().getId());
case REPLY:
commentRepository.decreaseReplyCount(commentId);
}
voteRepository.decreaseCommentCount(comment.getVote().getId());
commentRepository.delete(comment);
}

Expand Down

0 comments on commit 5b4bdc9

Please sign in to comment.