diff --git a/src/main/java/com/leets/xcellentbe/domain/comment/dto/CommentResponseDto.java b/src/main/java/com/leets/xcellentbe/domain/comment/dto/CommentResponseDto.java index a145b0e..77be15a 100644 --- a/src/main/java/com/leets/xcellentbe/domain/comment/dto/CommentResponseDto.java +++ b/src/main/java/com/leets/xcellentbe/domain/comment/dto/CommentResponseDto.java @@ -48,8 +48,8 @@ public static CommentResponseDto from(Comment comment, boolean isOwner, CommentS if (depth <= 0 || comment == null) { // 깊이 제한 또는 null일 때 호출 중단 return CommentResponseDto.builder() .commentId(comment.getCommentId()) - .userName(comment.getArticle().getWriter().getUserName()) - .customId(comment.getArticle().getWriter().getCustomId()) + .userName(comment.getWriter().getUserName()) + .customId(comment.getWriter().getCustomId()) .content(comment.getContent()) .deletedStatus(comment.getDeletedStatus()) .viewCnt(comment.getViewCnt()) @@ -62,8 +62,8 @@ public static CommentResponseDto from(Comment comment, boolean isOwner, CommentS return CommentResponseDto.builder() .commentId(comment.getCommentId()) - .userName(comment.getArticle().getWriter().getUserName()) - .customId(comment.getArticle().getWriter().getCustomId()) + .userName(comment.getWriter().getUserName()) + .customId(comment.getWriter().getCustomId()) .content(comment.getContent()) .deletedStatus(comment.getDeletedStatus()) .viewCnt(comment.getViewCnt())