This commit is contained in:
DingZQ
2022-10-15 17:42:48 +08:00
parent a31cf07262
commit f880abf10d

View File

@@ -97,9 +97,12 @@ async def fastapi_sync_with_server(network: str, operationid: int) -> ChangeSet:
return sync_with_server(network, operationid)
@app.post("/batch/")
async def fastapi_execute_batch_commands(network: str, payload: dict = Body(...)) -> ChangeSet:
print(payload)
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
jsTxt = await req.json()
jo = json.loads(jsTxt)
print(jo)
print(type(jo))
# node
@app.get("/getnodes/")
async def fastapi_get_nodes(network: str) -> list[str]: