Skip to content

Commit 7152613

Browse files
committed
refactor(community): 코드 리뷰 사항 반영
- markAsDeleted 메서드 내에서 content 내용 변경 - 개행 추가
1 parent 3fc1fb9 commit 7152613

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/com/somemore/community/domain/CommunityComment.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public void updateWith(CommunityCommentUpdateRequestDto dto) {
5252
this.content = dto.content();
5353
}
5454

55-
public void replaceComment() {
55+
@Override
56+
public void markAsDeleted() {
57+
super.markAsDeleted();
5658
this.content = "삭제된 댓글입니다";
5759
}
5860

src/main/java/com/somemore/community/service/comment/DeleteCommunityCommentService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public void deleteCommunityComment(UUID writerId, Long id) {
2828

2929
communityComment.markAsDeleted();
3030

31-
communityComment.replaceComment();
32-
3331
communityCommentRepository.save(communityComment);
3432
}
3533

src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ void getCommentsByCommunityBoardIdWithDeletedComment() {
135135
assertThat(comments.getFirst().replies()).hasSize(1);
136136
assertThat(comments.getFirst().replies().getFirst().id()).isEqualTo(replyId);
137137
}
138-
}
138+
}

0 commit comments

Comments
 (0)