Skip to content

Commit

Permalink
refactor(Comment): 메소드 위치 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Jun 4, 2024
1 parent 7ac34ca commit e4eb4ee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ public PagedResponseDto<CommentResponseDto> 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<CommentMyResponseDto> getMyComments(Pageable pageable) {
Member currentMember = memberService.getCurrentMember();
Expand Down Expand Up @@ -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));
}

}

0 comments on commit e4eb4ee

Please sign in to comment.