Example #1
0
def update(id):
    temp = Lugar.get(id)
    data = request.get_json()
    if not temp or not data or not Lugar.valid(data):
        abort(404)
    return Lugar.update(id, data)
Example #2
0
def store():
    data = request.get_json()
    if not request.json or not Lugar.valid(data):
        abort(400)
    return Lugar.add(data)