diff --git a/main.py b/main.py index b6ad39a..b47bb0c 100644 --- a/main.py +++ b/main.py @@ -2095,11 +2095,11 @@ async def get_simulationresult(): # def query_latest_record_by_ID(ID: str, type: str, bucket: str="realtime_data", client: InfluxDBClient=client) -> dict: @app.get("/querynodelatestrecordbyid/") async def query_node_latest_record_by_id(id: str): - return influxdb_api.query_latest_record_by_ID(id, type='node', client=influx_client); + return influxdb_api.query_latest_record_by_ID(id, type='node', client=influx_client) @app.get("/querylinklatestrecordbyid/") async def query_link_latest_record_by_id(id: str): - return influxdb_api.query_latest_record_by_ID(id, type='link', client=influx_client); + return influxdb_api.query_latest_record_by_ID(id, type='link', client=influx_client) # def query_all_record_by_time(query_time: str, bucket: str="realtime_data", client: InfluxDBClient=client) -> tuple: @app.get("/queryallrecordbytime/") @@ -2109,12 +2109,12 @@ async def query_all_record_by_time(querytime: str) -> dict[str, list]: "links": results[1] } # def query_curve_by_ID_property_daterange(ID: str, type: str, property: str, start_date: str, end_date: str, bucket: str="realtime_data", client: InfluxDBClient=client) -> list: -@app.get("/querynodecurvebyidpropertydatarage/") -async def query_node_curve_by_id_property_datarage(id: str, prop: str, startdate: str, enddate: str): +@app.get("/querynodecurvebyidpropertydaterange/") +async def query_node_curve_by_id_property_daterange(id: str, prop: str, startdate: str, enddate: str): return influxdb_api.query_curve_by_ID_property_daterange(id, type='node', property=prop, start_date=startdate, end_date=enddate, client=influx_client) -@app.get("/querylinkcurvebyidpropertydatarage/") -async def query_link_curve_by_id_property_datarage(id: str, prop: str, startdate: str, enddate: str): +@app.get("/querylinkcurvebyidpropertydaterange/") +async def query_link_curve_by_id_property_daterange(id: str, prop: str, startdate: str, enddate: str): return influxdb_api.query_curve_by_ID_property_daterange(id, type='link', property=prop, start_date=startdate, end_date=enddate, client=influx_client)