Refine export inp, add vertice and scada

This commit is contained in:
DingZQ
2023-05-02 22:17:40 +08:00
parent 9626473b76
commit 19cfd21e81

View File

@@ -86,7 +86,11 @@ async def fastapi_import_inp(network: str, req: Request):
@app.get("/exportinp/")
async def fastapi_export_inp(network: str) -> ChangeSet:
return export_inp(network)
cs = export_inp(network)
op = cs.operations[0]
op['vertices'] = str(get_all_vertices(network))
op['scada'] = str(get_all_scada_elements(network))
return cs
@app.post("/readinp/")
async def fastapi_read_inp(network: str, inp: str) -> bool: