Skip to content

CommentLike Controller

JainalGandhi edited this page May 12, 2020 · 1 revision

API/CommentLike/Post

Method Type: POST (authentication required)

Description: Likes the comment associated with the inputted commentId for the authenticated user making the request

Input

Input Parameter Type Description
CommentId int The CommentId of the Comment to be liked by the user

Response

Status Code Status Code Meaning Response
401 Unauthorized The request sent by the client could not be authenticated -
404 Not Found No Comment with the inputted CommentId could be found -
200 OK The Comment corresponding to the CommentId was already liked by the user -
201 Created A CommentLike with the CommentId and the User was successfully created -

API/CommentLike/Delete

Method Type: POST (authentication required)

Description: Deletes a CommentLike with the inputted CommentId for the authenticated user making the request

Input

Input Parameter Type Description
CommentId int The CommentId to be unliked by the user

Response

Status Code Status Code Meaning Response
401 Unauthorized The request sent by the client could not be authenticated -
404 Not Found No Comment with the inputted CommentId could be found -
204 No Content No CommentLike with the CommentId was found for the user -
200 OK A CommentLike with the CommentId and the User was successfully deleted -

Clone this wiki locally