Batch
This commit is contained in:
9
main.py
9
main.py
@@ -97,9 +97,12 @@ async def fastapi_sync_with_server(network: str, operationid: int) -> ChangeSet:
|
|||||||
return sync_with_server(network, operationid)
|
return sync_with_server(network, operationid)
|
||||||
|
|
||||||
@app.post("/batch/")
|
@app.post("/batch/")
|
||||||
async def fastapi_execute_batch_commands(network: str, payload: dict = Body(...)) -> ChangeSet:
|
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
|
||||||
print(payload)
|
jsTxt = await req.json()
|
||||||
|
jo = json.loads(jsTxt)
|
||||||
|
print(jo)
|
||||||
|
print(type(jo))
|
||||||
|
|
||||||
# node
|
# node
|
||||||
@app.get("/getnodes/")
|
@app.get("/getnodes/")
|
||||||
async def fastapi_get_nodes(network: str) -> list[str]:
|
async def fastapi_get_nodes(network: str) -> list[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user