v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
📸 Social Media

Update comment

The API endpoint allows users to update a comment associated with a post based on the comment ID provided in the path variable.

By accessing this endpoint and specifying the comment ID, users can modify the content or other attributes of the comment associated with the post.

patch/social-media/comments/{commentId}

Request body

contentstring

Example request

{
  "content": "Updated content"
}

Response

Delete comment

messagestring
statusCodenumber
successboolean

Example response

{
  "data": {
    "deletedComment": {
      "_id": "64973f433acb0ae20a97a354",
      "author": "6497369d3e2615fb255a947d",
      "content": "My first comment",
      "createdAt": "2023-06-24T19:08:51.260Z",
      "postId": "649736ac3e2615fb255a948b",
      "updatedAt": "2023-06-24T19:08:51.260Z"
    }
  },
  "message": "Comment deleted successfully",
  "statusCode": 200,
  "success": true
}