Update option methods to v3
This commit is contained in:
7
main.py
7
main.py
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user