Add api compressedbatch
This commit is contained in:
7
main.py
7
main.py
@@ -104,6 +104,13 @@ async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet
|
||||
cs.operations = jo_root['operations']
|
||||
return execute_batch_commands(network, cs)
|
||||
|
||||
@app.post("/compressedbatch/")
|
||||
async def fastapi_execute_compressed_batch_commands(network: str, req: Request)-> ChangeSet:
|
||||
jo_root = await req.json()
|
||||
cs: ChangeSet = ChangeSet()
|
||||
cs.operations = jo_root['operations']
|
||||
return execute_batch_command(network, cs)
|
||||
|
||||
@app.post("/takesnapshot/")
|
||||
async def fastapi_take_snapeshot(network: str, snapshot: str)-> int:
|
||||
return take_snapshot(network, snapshot)
|
||||
|
||||
Reference in New Issue
Block a user