diff --git a/src/main/java/page/clab/api/domain/comment/application/CommentService.java b/src/main/java/page/clab/api/domain/comment/application/CommentService.java index c5f752268..f2c579e72 100644 --- a/src/main/java/page/clab/api/domain/comment/application/CommentService.java +++ b/src/main/java/page/clab/api/domain/comment/application/CommentService.java @@ -67,10 +67,6 @@ public PagedResponseDto getAllComments(Long boardId, Pageabl return new PagedResponseDto<>(commentDtos); } - private void sortChildrenComments(Comment comment) { - comment.getChildren().sort(Comparator.comparing(Comment::getCreatedAt)); - } - @Transactional(readOnly = true) public PagedResponseDto getMyComments(Pageable pageable) { Member currentMember = memberService.getCurrentMember(); @@ -186,4 +182,8 @@ private CommentMyResponseDto toCommentMyResponseDto(Comment comment, Member curr return CommentMyResponseDto.toDto(comment, hasLikeByMe); } + private void sortChildrenComments(Comment comment) { + comment.getChildren().sort(Comparator.comparing(Comment::getCreatedAt)); + } + } \ No newline at end of file