修复类型错误
This commit is contained in:
@@ -13,7 +13,7 @@ async def fastapi_get_control_properties(network: str) -> dict[str, Any]:
|
||||
return get_control(network)
|
||||
|
||||
@router.post("/setcontrolproperties/", response_model=None)
|
||||
async def fastapi_set_control_properties(network: str, req: Request) -> ChangeSet:
|
||||
async def fastapi_set_control_properties(network: str, req: Request) -> "ChangeSet":
|
||||
props = await req.json()
|
||||
return set_control(network, ChangeSet(props))
|
||||
|
||||
@@ -26,6 +26,6 @@ async def fastapi_get_rule_properties(network: str) -> dict[str, Any]:
|
||||
return get_rule(network)
|
||||
|
||||
@router.post("/setruleproperties/", response_model=None)
|
||||
async def fastapi_set_rule_properties(network: str, req: Request) -> ChangeSet:
|
||||
async def fastapi_set_rule_properties(network: str, req: Request) -> "ChangeSet":
|
||||
props = await req.json()
|
||||
return set_rule(network, ChangeSet(props))
|
||||
|
||||
Reference in New Issue
Block a user