diff --git a/main.py b/main.py index 1ddf9ad..a012c8e 100644 --- a/main.py +++ b/main.py @@ -93,13 +93,13 @@ async def fastapi_get_current_operaiton_id(network: str) -> int: return get_current_operation(network) @app.get("/syncwithserver/") -def fastapi_sync_with_server(network: str, operationid: int) -> ChangeSet: +async def fastapi_sync_with_server(network: str, operationid: int) -> ChangeSet: return sync_with_server(network, operationid) @app.post("/batch/") -def fastapi_execute_batch_commands(network: str, request: Request) -> ChangeSet: +async def fastapi_execute_batch_commands(network: str, request: Request) -> ChangeSet: print(request) - jsTxt = request.json() + jsTxt = await request.json() print(jsTxt) joOps = json.loads(jsTxt)['operations'] cs:ChangeSet = ChangeSet({})