upvote
Upvote a Review
This endpoint allows users to upvote a specific review by sending an HTTP PATCH request to the specified URL. The request should include the review ID in the URL path. Upon successful execution, the response will include the updated review data along with any errors.
Request Body
This request does not require a request body.
Response Body
-
data(object)-
updatedReview(object)-
_id(string): The ID of the updated review. -
book(string): The book associated with the review. -
review(string): The content of the review. -
reviewer(string): The reviewer of the review. -
rating(number): The rating given to the book. -
upvoters(array): List of users who upvoted the review. -
downvoters(array): List of users who downvoted the review. -
isRemoved(boolean): Indicates whether the review is removed. -
createdAt(string): The timestamp of review creation. -
updatedAt(string): The timestamp of review update. -
__v(number): Version key.
-
-
-
error(null): If there are any errors, they will be included here.