Add isolated read-only official widget integration and searchable catalog
This commit is contained in:
@@ -753,6 +753,17 @@ def create_app(settings=None, start_worker=True):
|
||||
weather_provider=weather.config().provider,
|
||||
)
|
||||
|
||||
@app.get(
|
||||
"/api/v1/devices/{device_id}/widgets",
|
||||
response_model=__import__(
|
||||
"pigway_frame_flow.models", fromlist=["WidgetState"]
|
||||
).WidgetState,
|
||||
tags=["Devices"],
|
||||
dependencies=[Depends(require("devices:read"))],
|
||||
)
|
||||
def official_widgets(device_id: str):
|
||||
return registry.get(device_id).widgets()
|
||||
|
||||
@app.get(
|
||||
"/api/v1/devices/{device_id}/current-content",
|
||||
response_model=CurrentDisplay,
|
||||
|
||||
Reference in New Issue
Block a user