follow

요청을 보내면 접속중인 유저(from_user)가 to_user(pk=user_pk)를 팔로우, 언팔로우 합니다.

URL

/api/member/{user_pk}/follow/

Method

PATCH

Headers

Authorization : token [token_value]

Success Response

  • Code: 201 CREATED
  • Content: follow 관계가 생
{
  "to_user": 20,
  "from_user": 12,
  "status": "follow"
}
  • Code: 204 NO CONTENT

  • Content: follow 관계가 삭제 (unfollow)



Error Response

  • Code: 406 Not Acceptable
  • Reason: user 자신을 follow
  • Content:
{
  "status_code": "406 - Not Acceptable",
  "errors": [],
  "detail": "자기 자신은 follow할 수 없습니다"
}

results matching ""

    No results matching ""