downvote
Reviews
downvote
Downvote a Review
This endpoint is used to downvote a specific review.
Request Body
- No request body is required for this endpoint.
Response
The response will be a JSON object with the following schema:
{
"data": {
"updatedReview": {
"_id": "string",
"book": "string",
"review": "string",
"reviewer": "string",
"rating": 0,
"upvoters": ["string"],
"downvoters": ["string"],
"isRemoved": true,
"createdAt": "string",
"updatedAt": "string",
"__v": 0
},
"error": "string"
}
}
The updatedReview object contains the details of the review after the downvote action, including the review ID, book, review content, reviewer, rating, upvoters, downvoters, removal status, and timestamps. The error field will be null if the request is successful, otherwise, it will contain an error message.
PATCH
downvote