Add method of backdrop
This commit is contained in:
17
main.py
17
main.py
@@ -1133,15 +1133,18 @@ async def fastapi_delete_label(network: str, req: Request) -> ChangeSet:
|
|||||||
############################################################
|
############################################################
|
||||||
# backdrop 27.[BACKDROP]
|
# backdrop 27.[BACKDROP]
|
||||||
############################################################
|
############################################################
|
||||||
|
@app.get('/getbackdropschema/')
|
||||||
|
async def fastapi_get_backdrop_schema(network: str) -> dict[str, dict[str, Any]]:
|
||||||
|
return get_backdrop_schema(network)
|
||||||
|
|
||||||
def get_backdrop_schema(name: str) -> dict[str, dict[str, Any]]:
|
@app.get('/getbackdropproperties/')
|
||||||
return api.get_backdrop_schema(name)
|
async def fastapi_get_backdrop(network: str) -> dict[str, Any]:
|
||||||
|
return get_backdrop(network)
|
||||||
|
|
||||||
def get_backdrop(name: str) -> dict[str, Any]:
|
@app.post('/setbackdropproperties/')
|
||||||
return api.get_backdrop(name)
|
async def fastapi_set_backdrop(network: str, req: Request) -> ChangeSet:
|
||||||
|
props = await req.json()
|
||||||
def set_backdrop(name: str, cs: ChangeSet) -> ChangeSet:
|
return set_backdrop(network, ChangeSet(props))
|
||||||
return api.set_backdrop(name, cs)
|
|
||||||
|
|
||||||
|
|
||||||
# inp file
|
# inp file
|
||||||
|
|||||||
Reference in New Issue
Block a user