Refine code
This commit is contained in:
12
main.py
12
main.py
@@ -99,18 +99,8 @@ async def fastapi_sync_with_server(network: str, operationid: int) -> ChangeSet:
|
|||||||
@app.post("/batch/")
|
@app.post("/batch/")
|
||||||
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
|
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
|
||||||
jo_root = await req.json()
|
jo_root = await req.json()
|
||||||
print(jo_root)
|
|
||||||
jo_operations = jo_root['operations']
|
|
||||||
print(jo_operations)
|
|
||||||
print(type(jo_operations))
|
|
||||||
cs: ChangeSet = ChangeSet()
|
cs: ChangeSet = ChangeSet()
|
||||||
cs.operations = jo_operations
|
cs.operations = jo_root['operations']
|
||||||
print(cs)
|
|
||||||
print(type(cs))
|
|
||||||
ops = cs.operations
|
|
||||||
print(ops)
|
|
||||||
print(type(ops))
|
|
||||||
|
|
||||||
return execute_batch_commands(network, cs)
|
return execute_batch_commands(network, cs)
|
||||||
|
|
||||||
# node
|
# node
|
||||||
|
|||||||
Reference in New Issue
Block a user