Skip to main content

Like Comment

POST /post/comment/:commentId/like

Description

Toggles the authenticated user's like on a comment.

Request Parameters

Requires Authentication: true

PATH PARAMS

NameTypeRequiredDescription
commentIdstringYesMongoDB comment ID.

Success Response

{
"message": "The like was added to the comment",
"post": {
"_id": "66cbbea31e854f3d7995c1f0"
}
}

or

{
"message": "The like was removed from the comment",
"post": {
"_id": "66cbbea31e854f3d7995c1f0"
}
}

Error Response

CodeDescription
404Comment or post not found
401Missing or invalid access token
500Server error