修复类型错误
This commit is contained in:
@@ -72,21 +72,21 @@ async def take_snapshot_endpoint(network: str, tag: str) -> None:
|
||||
return take_snapshot(network, tag)
|
||||
|
||||
@router.post("/picksnapshot/", response_model=None)
|
||||
async def pick_snapshot_endpoint(network: str, tag: str, discard: bool = False) -> ChangeSet:
|
||||
async def pick_snapshot_endpoint(network: str, tag: str, discard: bool = False) -> "ChangeSet":
|
||||
return pick_snapshot(network, tag, discard)
|
||||
|
||||
@router.post("/pickoperation/", response_model=None)
|
||||
async def pick_operation_endpoint(
|
||||
network: str, operation: int, discard: bool = False
|
||||
) -> ChangeSet:
|
||||
) -> "ChangeSet":
|
||||
return pick_operation(network, operation, discard)
|
||||
|
||||
@router.get("/syncwithserver/", response_model=None)
|
||||
async def sync_with_server_endpoint(network: str, operation: int) -> ChangeSet:
|
||||
async def sync_with_server_endpoint(network: str, operation: int) -> "ChangeSet":
|
||||
return sync_with_server(network, operation)
|
||||
|
||||
@router.post("/batch/", response_model=None)
|
||||
async def execute_batch_commands_endpoint(network: str, req: Request) -> ChangeSet:
|
||||
async def execute_batch_commands_endpoint(network: str, req: Request) -> "ChangeSet":
|
||||
jo_root = await req.json()
|
||||
cs: ChangeSet = ChangeSet()
|
||||
cs.operations = jo_root["operations"]
|
||||
@@ -96,7 +96,7 @@ async def execute_batch_commands_endpoint(network: str, req: Request) -> ChangeS
|
||||
@router.post("/compressedbatch/", response_model=None)
|
||||
async def execute_compressed_batch_commands_endpoint(
|
||||
network: str, req: Request
|
||||
) -> ChangeSet:
|
||||
) -> "ChangeSet":
|
||||
jo_root = await req.json()
|
||||
cs: ChangeSet = ChangeSet()
|
||||
cs.operations = jo_root["operations"]
|
||||
|
||||
Reference in New Issue
Block a user