Example #1
0
def _run_on_start():
    Camara.connect()
Example #2
0
def index():
    return jsonify(Camara.getall())
Example #3
0
def destroy(id):
    temp = Camara.get(id)
    if not temp: abort(404)
    return Camara.remove(id)
Example #4
0
def update(id):
    temp = Camara.get(id)
    data = request.get_json()
    if not temp or not data or not Camara.valid(data):
        abort(404)
    return Camara.update(id, data)
Example #5
0
def store():
    data = request.get_json()
    if not request.json or not Camara.valid(data):
        abort(400)
    return Camara.add(data)
Example #6
0
def search(q):
    return jsonify(Camara.buscar(q))
Example #7
0
def show(id):
    return jsonify(Camara.get(id))