Add tack snapshot and pick snapshot

This commit is contained in:
DingZQ
2022-10-24 21:44:05 +08:00
parent e8fea3878d
commit 4371d551f9

View File

@@ -103,6 +103,14 @@ async def fastapi_execute_batch_commands(network: str, req: Request)-> ChangeSet
cs: ChangeSet = ChangeSet()
cs.operations = jo_root['operations']
return execute_batch_commands(network, cs)
@app.post("/tacksnapshot/")
async def fastapi_take_snapeshot(network: str, snapshot: str)-> int:
return take_snapshot(network, snapshot)
@app.post("/picksnapshot/")
async def fastapi_pick_snapeshot(network: str, snapshot: str)-> ChangeSet:
return pick_snapshot(network, snapshot)
# node
@app.get("/getnodes/")