Answer Detail
입력한 pk와 일치하는 Answer Object에 대한 정보를 반환합니다.
URL
/post/answer/<pk>/
Method
GET
Success Response
HTTP Status Code
200
Content
Key | Description | Type |
---|---|---|
pk | Answer의 pk | Int |
user | User의 pk | Int |
question | Answer가 달린 Question의 pk | Int |
content | quillJS 텍스트 에디터에서 .getContent()를 통해 뽑아낸 json데이터 | JSON |
upvote_count | Answer의 좋아요 개수 | Int |
comment_count | Answer의 코멘트 개수 | Int |
user_upvote_relation | 유저가 추천을 한 경우 해당 추천 action의 정보를 담은 relation의 pk 값입니다. Value의 유무로 upvote 표현방식을 결정할 수 있습니다. | Int |
user_bookmark_relation | 유저가 북마크를 한 경우 해당 북마크 action의 정보를 담은 relation의 pk 값입니다. | Int |
published | True or False | Bool |
created_at | 생성된 날짜 | Date |
modified_at | 마지막으로 수정된 날짜 - 처음 생성되었을 때는 created_at과 같음 | Date |
{
"pk": 7,
"user": 1,
"question": 1,
"content": {
<Quill JS Content>
},
"upvote_count": 30,
"comment_count": 0,
"user_upvote_relation": null,
"user_bookmark_relation": null,
"published": False,
"created_at": "2017-12-02",
"modified_at": "2017-12-02T17:52:38.668955+09:00"
}
Error Response
Page Not Found Error
HTTP Status Code
404
Content
# pk값과 일치하는 Answer가 없을 때
{
"detail": "찾을 수 없습니다."
}