Post Like Toggle
입력한 primary key에 해당하는 Post object에 대한 PostLike object를 생성 또는 삭제합니다.
URL/post/<pk>/post-like-toggle/
MethodPOST
Success response
HTTP Status code
204
Content
# PostLike object가 생성된 경우의 response
{
"like_or_not": true
}
# PostLike object가 삭제된 경우의 response
{
"like_or_not": false
}
Error response
Unauthorized error
HTTP Status code
401
Content
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}
Post object does not exist error
HTTP Status code
404
Content
{
"detail": "찾을 수 없습니다."
}