⌨️댓글 CRUD API
댓글 작성 API
POST
localhost:3000/api/posts/:postId/comments
Request Body
Name
Type
Description
content*
string
content of the comment
{
message:"댓글 작성에 성공하였습니다."
}
댓글 전체 조회 API
GET
localhost:3000/api/posts/:postId/comments
{
comments
}
댓글 수정 API
PATCH
localhost:3000/api/posts/:postId/comments/:commentId
Request Body
Name
Type
Description
content*
String
content of the comment
{
message:"댓글 수정에 성공하였습니다."
}
댓글 삭제 API
DELETE
localhost:3000/api/posts/:postId/comments/:commentId
{
message:"댓글 삭제에 성공하였습니다."
}
Last updated