Batch
This commit is contained in:
6
main.py
6
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({})
|
||||
|
||||
Reference in New Issue
Block a user