Update option methods to v3

This commit is contained in:
DingZQ
2023-06-01 20:16:12 +08:00
parent 217a59cdfe
commit 634f9da5e8

View File

@@ -1340,17 +1340,16 @@ async def fastapi_set_time_properties(network: str, req: Request) -> ChangeSet:
############################################################
@app.get('/getoptionschema/')
async def fastapi_get_option_schema(network: str) -> dict[str, dict[str, Any]]:
return get_option_schema(network)
return get_option_v3_schema(network)
@app.get("/getoptionproperties/")
async def fastapi_get_option_properties(network: str) -> dict[str, Any]:
return get_option(network)
return get_option_v3(network)
@app.post("/setoptionproperties/")
async def fastapi_set_option_properties(network: str, req: Request) -> ChangeSet:
props = await req.json()
return set_option(network, ChangeSet(props))
return set_option_v3(network, ChangeSet(props))
############################################################
# coord 24.[COORDINATES]