This commit is contained in:
DingZQ
2023-05-13 09:39:39 +08:00
parent b4f3aa2c1b
commit 0ed1bb6af2

View File

@@ -244,8 +244,10 @@ async def fastapi_sync_with_server(network: str, operation: int) -> ChangeSet:
@app.post("/batch/")
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
jo_root = await req.json()
print(jo_root)
cs: ChangeSet = ChangeSet()
cs.operations = jo_root['operations']
print(cs)
rcs = execute_batch_commands(network, cs)
print(rcs)
return rcs