refine runproject

This commit is contained in:
DingZQ
2022-11-25 10:38:12 +08:00
parent e002c1d653
commit 9396b58638

View File

@@ -78,11 +78,10 @@ async def fastapi_read_inp(network: str, inp: str) -> None:
async def fastapi_dump_inp(network: str, inp: str) -> None:
return dump_inp(network, inp)
# 必须用这个PlainTextResponse不然每个key都有引号
@app.get("/runproject/", response_class = PlainTextResponse)
async def fastapi_run_project(network: str) -> str:
result = run_project(network)
print(result)
return result
return run_project(network)
# put in inp folder, name without extension
@app.get("/runinp/")