Skip to content

Commit

Permalink
Comment: findParentComment의 주석 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jj0526 committed Jul 20, 2024
1 parent 8756f0a commit abe1b13
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ public void delete(Long userId, Long commentId) throws InvalidAccessException {
postRepository.save(currentPost);
}

// 댓글의 부모를 찾는 메서드
// 댓글의 부모 찾기
private Comment findParentComment(Long commentId) {
// 부모 댓글을 찾는 로직을 여기에 추가합니다.
// 예를 들어, 댓글의 자식 댓글을 모두 로드하여 부모를 찾을 수 있습니다.
List<Comment> allComments = commentRepository.findAll();
for (Comment comment : allComments) {
if (comment.getChildren().stream().anyMatch(child -> child.getId().equals(commentId))) {
Expand Down

0 comments on commit abe1b13

Please sign in to comment.