예제 #1
0
def api_reports(type, year, month):
    try:
        data = json.load(
            open("app/static/reports/" + year + "/" + month + "/" + type + "_" + month + "_" + year + ".json",
                 "r"))
        return jsonify(data)
    except Exception as e:
        return page_not_found(e)
예제 #2
0
def api_reports(type, year, month):
    try:
        data = json.load(
            open(
                "app/static/reports/" + year + "/" + month + "/" + type + "_" +
                month + "_" + year + ".json", "r"))
        return jsonify(data)
    except Exception as e:
        return page_not_found(e)
def get_antenna_info(id):
    antenna = Antenna.query.filter(Antenna.id == id).first()
    if antenna:
        return jsonify(antenna.serialize)
    else:
        return page_not_found(404)
def get_antenna_info(id):
    antenna = Antenna.query.filter(Antenna.id == id).first()
    if antenna:
        return jsonify(antenna.serialize)
    else:
        return page_not_found()