Beispiel #1
0
def review(business_id):
    response = jsonify({})
    review = Review(review_description=str(
        request.data.get('review_description', '')),
                    username=int(request.data.get('username', '')))
    response = jsonify(Review.get_review(review))
    response.status_code = 200
    return response
Beispiel #2
0
def reviews(business_id):
    response = jsonify({})
    reviews = []
    reviews_list = Review.get_reviews()
    for review in reviews_list:
        if review.business_id == business_id:
            reviews.append(Review.get_review(review))
    response = jsonify(reviews)
    response.status_code = 200
    return response