status; removal is a soft delete that
can be undone.
Publish or reject
Move apending review to published or rejected with updateReviewWorkflow,
setting the status field:
src/api/custom/moderate/route.ts
updateReviewWorkflow also accepts rating, customer_note, and seller_note,
so the same workflow is used for any correction to a review. It captures the
previous values for compensation, so a failure downstream rolls the record back.
Delete a review
Remove a review withdeleteReviewWorkflow. This is a soft delete. The row
is retained and restored automatically if the workflow is rolled back:
React to moderation
To run your own side effects when a review is published or rejected, wrapupdateReviewWorkflow in a route that also runs your follow-up logic, or add a
hook. See the Events reference for the
current state of review-domain events.