diff --git a/main.py b/main.py index 86b1896..bbb3a12 100644 --- a/main.py +++ b/main.py @@ -163,6 +163,22 @@ async def fastapi_redo(network: str): async def fastapi_have_snapshot(network: str, tag: str) -> bool: return have_snapshot(network, tag) +@app.get('/havesnapshotforoperation/') +async def fastapi_have_snapshot_for_operation(network: str, operation: int) -> bool: + return have_snapshot_for_operation(network, operation) + +@app.get('/havesnapshotforcurrentoperation/') +async def fastapi_have_snapshot_for_current_operation(network: str) -> bool: + return have_snapshot_for_current_operation(network) + +@app.post('/takesnapshotforoperation/') +async def fastapi_take_snapshot_for_operation(network: str, operation: int, tag: str) -> None: + return take_snapshot_for_operation(network, operation, tag) + +@app.post('takenapshotforcurrentoperation') +async def fastapi_take_snapshot_for_current_operation(network: str, tag: str) -> None: + return take_snapshot_for_current_operation(network, tag) + @app.post('/takesnapshot/') def fastapi_take_snapshot(network: str, tag: str) -> int | None: return take_snapshot(network, tag)