Comment Update
입력한 데이터로 해당 Comment Instance를 최신화 시킵니다.
URL
/post/comment/<pk>/
Method
PATCH
, PUT
Data Params
Key | Description | Type | Require |
---|---|---|---|
content | Comment 내용 | String | False |
Success Response
HTTP Status Code
201
Content
Key | Description | Type |
---|---|---|
pk | Answer의 pk | Int |
user | 코멘트를 올린 User의 pk | Int |
related_post | Comment가 달린 Answer 혹은 Question의 정보를 string 포맷으로 반환 - "<post_type> - <post_pk>" 형식으로 표현 | Str |
parent | Comment의 상위(존재하면) comment의 pk | Int |
created_at | 생성된 날짜 | Date |
modified_at | 마지막으로 수정된 날짜 - 처음 생성되었을 때는 created_at과 같음 | Date |
content | Comment 내용 | Str |
{
"pk": 21,
"user": 1,
"related_post": "question - 6",
"parent": 5,
"created_at": "2017-12-07T01:46:36.631455+09:00",
"modified_at": "2017-12-07T01:46:36.631507+09:00",
"content": "코멘트입니다."
}
Error Response
Bad Request Error
HTTP Status Code
400
Content
Forbidden Error
HTTP Status Code
403
Content