Refine import inp
This commit is contained in:
8
main.py
8
main.py
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user