cURL
curl --request GET \ --url https://localhost:5000/comments/get/{post_id} \ --header 'Authorization: Bearer <token>'
{ "success": true, "comments": [ { "text": "<string>", "author": "<string>", "post": "<string>", "_id": "<string>", "parentComment": "<string>", "replyTo": "<string>", "likes": [ "<string>" ], "repliesCount": 0, "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z" } ] }
Get all top-level comments for a specific post (excludes replies)
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Post ID
Post comments
true
Show child attributes