Skip to content

Commit fa7c436

Browse files
authored
Merge pull request #303 from DevKor-github/chore/reply
chore(coll): 대댓글 작성 요청 바디 필드명 parentId로 변경
2 parents 57ebc0d + 4844ecd commit fa7c436

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/org/devkor/apu/saerok_server/domain/collection/api/dto/request/CreateCollectionCommentRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ public record CreateCollectionCommentRequest(
77
String content,
88

99
@Schema(description = "부모 댓글 ID (대댓글 작성 시)", example = "123", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
10-
Long commentId
10+
Long parentId
1111
) {
1212
}

src/main/java/org/devkor/apu/saerok_server/domain/collection/application/CollectionCommentCommandService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public CreateCollectionCommentResponse createComment(Long userId,
4444
UserBirdCollectionComment comment;
4545
UserBirdCollectionComment parentComment = null;
4646

47-
if (req.commentId() != null) {
48-
parentComment = commentRepository.findById(req.commentId())
47+
if (req.parentId() != null) {
48+
parentComment = commentRepository.findById(req.parentId())
4949
.orElseThrow(() -> new NotFoundException("존재하지 않는 댓글 id예요"));
5050

5151
// 같은 컬렉션에 속하는지 확인

0 commit comments

Comments
 (0)