Beispiel #1
0
def business_details(business_id):
    response = jsonify({})
    business = {}
    businesses_list = Business.get_businesses()
    for bus in businesses_list:
        if bus.id == int(business_id):
            business = Business.get_business_details(bus)
    response = jsonify(business)
    response.status_code = 200
    return response
Beispiel #2
0
def delete_business(business_id):
    response = jsonify({})
    businesses = Business.get_businesses()
    for bus in businesses:
        if bus.id == int(business_id):
            businesses.remove(bus)
    businesses_list = []
    for bus in businesses:
        businesses_list.append(Business.get_business_details(bus))
    response = jsonify(businesses_list)
    response.status_code = 200

    return response