Change deviceid to id
This commit is contained in:
5
main.py
5
main.py
@@ -1411,8 +1411,8 @@ async def fastapi_get_scada_device_data_schema(network: str) -> dict[str, dict[s
|
||||
return get_scada_device_data_schema(network)
|
||||
|
||||
@app.get('/getscadadevicedata/')
|
||||
async def fastapi_get_scada_device_data(network: str, device_id: str) -> dict[str, Any]:
|
||||
return get_scada_device_data(network, device_id)
|
||||
async def fastapi_get_scada_device_data(network: str, id: str) -> dict[str, Any]:
|
||||
return get_scada_device_data(network, id)
|
||||
|
||||
# example: set_scada_device_data(p, ChangeSet({'device_id': 'sm_device', 'data': [{ 'time': '2023-02-10 00:02:22', 'value': 100.0 }, { 'time': '2023-02-10 00:03:22', 'value': 200.0 }]}))
|
||||
# time format must be 'YYYY-MM-DD HH:MM:SS'
|
||||
@@ -1468,6 +1468,7 @@ async def fastapi_delete_scada_element(network: str, req: Request) -> ChangeSet:
|
||||
async def fastapi_clean_scada_element(network: str) -> ChangeSet:
|
||||
return clean_scada_element(network)
|
||||
|
||||
|
||||
# inp file
|
||||
@app.post("/uploadinp/", status_code=status.HTTP_200_OK)
|
||||
async def upload_inp(file: bytes = File(), name: str = None):
|
||||
|
||||
Reference in New Issue
Block a user