def get_drinks_detail(payload): drinks = Drink.get_all() if len(drinks) == 0: abort(404) return ( jsonify({ "drinks": [drink.long() for drink in drinks], "success": True }), 200, )
def get_drinks(): drinks = Drink.get_all() if len(drinks) == 0: abort(404) return ( jsonify({ "drinks": [drink.short() for drink in drinks], "success": True }), 200, )