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/")
|
||||
async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet:
|
||||
jo_root = await req.json()
|
||||
print(jo_root)
|
||||
jo_operations = jo_root['operations']
|
||||
print(jo_operations)
|
||||
print(type(jo_operations))
|
||||
cs: ChangeSet = ChangeSet()
|
||||
cs.operations = jo_operations
|
||||
print(cs)
|
||||
print(type(cs))
|
||||
ops = cs.operations
|
||||
print(ops)
|
||||
print(type(ops))
|
||||
|
||||
cs.operations = jo_root['operations']
|
||||
return execute_batch_commands(network, cs)
|
||||
|
||||
# node
|
||||
|
||||
Reference in New Issue
Block a user