API Calls
- Fetch all comment reports:
fetchAllCommentReports - Get a specific report:
fetchCommentReportById - Take action on a report:
handleCommentReportAction - Delete a report:
deleteCommentReport - Get pending reports count:
getPendingCommentReportsCount
API Documentation
1. Get All Comment Reports
Endpoint:/reports/comments
Method: GET
Description: Retrieves all comment reports with filtering options.
Query Parameters:
page: Number (pagination)limit: Number (pagination limit)status: String (pending,resolved)blockAuthor: String (yes,no)
2. Get a Specific Report
Endpoint:/reports/comments/{reportId}
Method: GET
Description: Retrieves details of a specific reported comment.
Response:
3. Take Action on a Comment Report
Endpoint:/reports/comments/{reportId}/action
Method: POST
Description: Performs administrative actions on a reported comment.
Request Body:
delete_comment– Deletes the reported comment.block_author– Blocks the author of the comment.resolve– Marks the report as resolved.
4. Delete a Comment Report
Endpoint:/reports/comments/{reportId}
Method: DELETE
Description: Deletes a comment report from the system.
Response:
5. Get Pending Comment Reports Count
Endpoint:/reports/comments/pending-count
Method: GET
Description: Retrieves the number of pending comment reports.
Response:

