From 9aaf3475fe1993815f856af470c35de9cb46ced2 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Wed, 26 Oct 2022 22:12:59 +0800 Subject: [PATCH] Add api compressedbatch --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 3975fe9..38a8880 100644 --- a/main.py +++ b/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)