Ejemplo n.º 1
0
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,
    )
Ejemplo n.º 2
0
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,
    )