Created a helper method isOrderDone() which uses a new query in Order. The method checks if an order between a buyer and seller exists and if it is a completed transaction. It returns true if transaction is done. If order doesn't exist or is not completed return false.
The helper method is used in createReview() to determine if a user is allowed to make a review.
Created a helper method isOrderDone() which uses a new query in Order. The method checks if an order between a buyer and seller exists and if it is a completed transaction. It returns true if transaction is done. If order doesn't exist or is not completed return false.
The helper method is used in createReview() to determine if a user is allowed to make a review.