diff --git a/src/main/java/leets/weeth/domain/post/service/CommentService.java b/src/main/java/leets/weeth/domain/post/service/CommentService.java index 1906b6d7..de6b6ad3 100644 --- a/src/main/java/leets/weeth/domain/post/service/CommentService.java +++ b/src/main/java/leets/weeth/domain/post/service/CommentService.java @@ -92,10 +92,8 @@ public void delete(Long userId, Long commentId) throws InvalidAccessException { postRepository.save(currentPost); } - // 댓글의 부모를 찾는 메서드 + // 댓글의 부모 찾기 private Comment findParentComment(Long commentId) { - // 부모 댓글을 찾는 로직을 여기에 추가합니다. - // 예를 들어, 댓글의 자식 댓글을 모두 로드하여 부모를 찾을 수 있습니다. List allComments = commentRepository.findAll(); for (Comment comment : allComments) { if (comment.getChildren().stream().anyMatch(child -> child.getId().equals(commentId))) {