Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.04 KB

[좋아요] 좋아요.md

File metadata and controls

57 lines (36 loc) · 1.04 KB

좋아요!

좋아요를 주는 기능

  • URL

    /like/clip /like/clip_comment /like/user_comment

  • Method:

    | POST |

  • URL Params

    Required:

    N/A

    Optional:

    N/A

  • Data Params

      {
          "target_id": 3
      }

    target_id 는 각각 clip 혹은 clip_comment 혹은 user_comment 의 id

  • Success Response:

    • Code: 200
      Content: { "okay" : true }
  • Error Response:

    • Code: 400 BAD REQUEST
      Content: { "okay": False, "msg": "target_id required" } Reason: clip id 가 전달되지 않았을 때

    • Code: HTTP_404_NOT_FOUND
      Content: { "okay": False, "msg": "No clip id #{}" } Reason: clip id는 있지만, 해당 id에 해당하는 clip 이 없을 때

    • Code: HTTP_400_BAD_REQUEST
      Content: { "okay": False, "msg": "duplicate found" } Reason: 똑같은 게시물에 2번 따봉하려고 했을 때

  • Sample Call:

  • Notes: