Skip to content

Commit 9d563a3

Browse files
committed
PostCommentController 디스크립션 수정
1 parent 51b0a4d commit 9d563a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

back/src/main/java/com/back/domain/post/comment/controller/PostCommentController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class PostCommentController {
2828
private final Rq rq;
2929
private final PostCommentService postCommentService;
3030

31-
@Operation(summary = "댓글 생성")
31+
@Operation(summary = "댓글 생성", description = "comment는 공백이나 Null이 될 수 없습니다. comment의 글자 수 제한은 없습니다.")
3232
@PostMapping("/post/{post_id}")
3333
public RsData<Void> createComment(@PathVariable Long post_id,
3434
@Valid @RequestBody CommentCreateRequest commentCreateRequest
@@ -43,21 +43,21 @@ public RsData<Void> createComment(@PathVariable Long post_id,
4343
@GetMapping("/post/{post_id}")
4444
public RsData<List<CommentAllResponse>> getAllPostComment(@PathVariable Long post_id) {
4545
List<CommentAllResponse> postAllResponse = postCommentService.getAllPostCommentResponse(post_id);
46-
return new RsData<>("200", "게시글 다건 조회 성공", postAllResponse);
46+
return new RsData<>("200", "댓글 조회 성공", postAllResponse);
4747
}
4848

49-
@Operation(summary = "댓글 삭제")
49+
@Operation(summary = "댓글 삭제", description = "commentId는 공백이나 Null이 될 수 없습니다.")
5050
@DeleteMapping("/post/{post_id}/comment")
5151
public RsData<Void> removePostComment(@PathVariable @Positive Long post_id
5252
, @RequestBody @Valid CommentDeleteRequest commentDeleteRequest) {
5353
Member member = rq.getActor();
5454

5555
postCommentService.removePostComment(post_id, commentDeleteRequest, member);
5656

57-
return new RsData<>("200", "게시글 삭제 성공", null);
57+
return new RsData<>("200", "댓글 삭제 성공", null);
5858
}
5959

60-
@Operation(summary = "댓글 수정")
60+
@Operation(summary = "댓글 수정", description = "commentId, content는 공백이나 Null이 될 수 없습니다. content의 글자 수 제한은 없습니다. ")
6161
@PutMapping("/post/{post_id}/comment/")
6262
public RsData<Void> updatePostComment(@PathVariable Long post_id
6363
, @Valid @RequestBody CommentModifyRequest commentModifyRequest) {

back/src/test/java/com/back/domain/post/comment/PostCommentControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void t3() throws Exception {
142142
.andExpect(handler().methodName("getAllPostComment"))
143143
.andExpect(status().isOk())
144144
.andExpect(jsonPath("$.data").isArray())
145-
.andExpect(jsonPath("$.msg").value("게시글 다건 조회 성공"))
145+
.andExpect(jsonPath("$.msg").value("댓글 조회 성공"))
146146
.andExpect(jsonPath("$.data").exists())
147147
.andExpect(jsonPath("$.data", hasSize(greaterThan(0))));
148148

@@ -186,7 +186,7 @@ void t4() throws Exception {
186186
.andExpect(handler().handlerType(PostCommentController.class))
187187
.andExpect(handler().methodName("removePostComment"))
188188
.andExpect(jsonPath("$.resultCode").value("200"))
189-
.andExpect(jsonPath("$.msg").value("게시글 삭제 성공"));
189+
.andExpect(jsonPath("$.msg").value("댓글 삭제 성공"));
190190
}
191191

192192
@Test

0 commit comments

Comments
 (0)