versions/v2/business.py
def read_business(businessId):
    """Reads Business given a business id"""
    business = get_in_module('business', businessId)

    if business:
        return jsonify({
            'business': {
                'id': business.id,
                'name': business.name,
                'logo': business.logo,
                'location': business.location,
                'category': business.category,
                'bio': business.bio,
                'owner': business.owner.username,
                'created_at': business.created_at,
                'updated_at': business.updated_at
            }
        }), 200
    return jsonify({'warning': 'Business Not Found'}), 404
Reads Business given a business id
Reads Business given a business id
Reads Business given a business id
def read_business(businessId):
    business = get_in_module('business', businessId)
    if business:
        return jsonify({
            'business': {
                'id': business.id,
                'name': business.name,
                'logo': business.logo,
                'location': business.location,
                'category': business.category,
                'bio': business.bio,
                'owner': business.owner.username,
                'created_at': business.created_at,
                'updated_at': business.updated_at
            }
        }), 200
    return jsonify({'warning': 'Business Not Found'}), 404
def read_business ( businessId ) : business = get_in_module ( 'business' , businessId ) if business : return jsonify ( { 'business' : { 'id' : business . id , 'name' : business . name , 'logo' : business . logo , 'location' : business . location , 'category' : business . category , 'bio' : business . bio , 'owner' : business . owner . username , 'created_at' : business . created_at , 'updated_at' : business . updated_at } } ) , 200 return jsonify ( { 'warning' : 'Business Not Found' } ) , 404
Reads Business given a business id
Reads Business given a business id
"""Reads Business given a business id"""
businessId