API Calls
- Fetch all user reports:
fetchAllUserReports - Get a specific user report:
fetchUserReportById - Take action on a user report:
handleUserReportAction - Delete a user report:
deleteUserReport - Get pending user reports count:
getPendingUserReportsCount
API Documentation
1. Get All User Reports
Endpoint:/reports/users
Method: GET
Description: Retrieves all user reports with filtering options.
Query Parameters:
page: Number (pagination)limit: Number (pagination limit)status: String (pending,resolved)blockUser: String (yes,no)
2. Get a Specific User Report
Endpoint:/reports/users/{reportId}
Method: GET
Description: Retrieves details of a specific reported user.
Response:
3. Take Action on a User Report
Endpoint:/reports/users/{reportId}/action
Method: POST
Description: Performs administrative actions on a reported user.
Request Body:
block_user– Blocks the reported user.delete_user– Deletes the reported user account.resolve– Marks the report as resolved.
4. Delete a User Report
Endpoint:/reports/users/{reportId}
Method: DELETE
Description: Deletes a user report from the system.
Response:
5. Get Pending User Reports Count
Endpoint:/reports/users/pending-count
Method: GET
Description: Retrieves the number of pending user reports.
Response:

