Post Like & Like 취소

포스트 좋아요 기능


METHOD & URL

POST /post/pk/like/

동일한 요청을 다시 보내면 좋아요 취소


Permission

등록된 유저만


Request

Authorization: 유저 인증 정보


Success Response

HTTP Response

200 OK

Content

{
    "id": 포스트 id값,
    "title": "포스트 제목",
    "author": {
        "id": 작성자 id값,
        "email": "이메일",
        "nickname": "닉네임",
        "instrument": "B",
        "is_staff": false,
        "last_login": null
    },
    "liked": [
        유저 id 값,
    ],
    "num_liked": 좋아요 개수,
    "created_date": "포스트 생성 일시",
    "master_track": null,
    "author_track": "트랙 주소",
    "comment_tracks": []
}

Error Response

401 Unauthorized
{
    "detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}

results matching ""

    No results matching ""