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': '*'}
def update_bus(): return jsonify(Bus().update_bus(request.json))
def insert_trunc(): return jsonify(Bus().insert_bus_transaction(request.json))
def insert_bus(): return jsonify(Bus().insert_bus(request.json))
def bus_one(bus): return jsonify(Bus().get_one_bus_info(bus))
def bus_all(): return jsonify(Bus().get_all_bus_info()), 200, { 'Access-Control-Allow-Origin': '*' }