Refine import inp

This commit is contained in:
DingZQ
2023-02-19 21:34:37 +08:00
parent 2199f54428
commit 39dfe2bd98

View File

@@ -77,9 +77,11 @@ async def fastapi_copy_project(source: str, target: str):
@app.post("/importinp/") @app.post("/importinp/")
async def fastapi_import_inp(network: str, req: Request): async def fastapi_import_inp(network: str, req: Request):
jo_root = await req.json() jo_root = await req.json()
cs: ChangeSet = ChangeSet() inp_text = jo_root['inp']
cs.operations = jo_root['inp'] ps = {
return import_inp(network, cs) "inp" : inp_text
}
return import_inp(network, ChangeSet(ps))
@app.get("/exportinp/") @app.get("/exportinp/")
async def fastapi_export_inp(network: str): async def fastapi_export_inp(network: str):