Beispiel #1
0
def static_equal():
    indication = 0
    rs = Bus().get_all_bus_info()
    for rec in rs:
        indication = max(indication, rec.get('индикация', 1))
    result = {'индикация': indication, 'data': rs}
    return jsonify(result), 200, {'Access-Control-Allow-Origin': '*'}
Beispiel #2
0
def update_bus():
    return jsonify(Bus().update_bus(request.json))
Beispiel #3
0
def insert_trunc():
    return jsonify(Bus().insert_bus_transaction(request.json))
Beispiel #4
0
def insert_bus():
    return jsonify(Bus().insert_bus(request.json))
Beispiel #5
0
def bus_one(bus):
    return jsonify(Bus().get_one_bus_info(bus))
Beispiel #6
0
def bus_all():
    return jsonify(Bus().get_all_bus_info()), 200, {
        'Access-Control-Allow-Origin': '*'
    }