diff --git a/src/main/java/treehouse/server/api/comment/business/CommentService.java b/src/main/java/treehouse/server/api/comment/business/CommentService.java index 72f38eb..e883b3a 100644 --- a/src/main/java/treehouse/server/api/comment/business/CommentService.java +++ b/src/main/java/treehouse/server/api/comment/business/CommentService.java @@ -6,7 +6,6 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; import treehouse.server.api.comment.implementation.CommentCommandAdapter; import treehouse.server.api.comment.implementation.CommentQueryAdapter; @@ -33,10 +32,8 @@ import treehouse.server.global.exception.GlobalErrorCode; import treehouse.server.global.exception.ThrowClass.CommentException; -import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.stream.Collector; import java.util.stream.Collectors; @Service @@ -128,7 +125,7 @@ public CommentResponseDTO.CommentIdResponseDto createComment(User user, Long tre Post post = postQueryAdapter.findById(postId); Member writer = memberQueryAdapter.findByUserAndTreehouse(user, treehouse); - Comment comment = CommentMapper.toComment(writer, post, request.getComment()); + Comment comment = CommentMapper.toComment(writer, post, request.getContext()); Long commentId = commentCommandAdapter.createComment(comment).getId(); return CommentMapper.toIdResponseDto(commentId); } diff --git a/src/main/java/treehouse/server/api/comment/presentation/dto/CommentRequestDTO.java b/src/main/java/treehouse/server/api/comment/presentation/dto/CommentRequestDTO.java index 17c79f9..77f6176 100644 --- a/src/main/java/treehouse/server/api/comment/presentation/dto/CommentRequestDTO.java +++ b/src/main/java/treehouse/server/api/comment/presentation/dto/CommentRequestDTO.java @@ -24,7 +24,7 @@ public static class reportComment{ @Getter public static class createComment{ // Comment 입력 조건에 따른 valid 조건 추가하기 - private String comment; + private String context; } @Getter