yera.ui.fastapi_routes.updates
Serve the optional release-update notice used by the browser shell.
Symbols
def register_update_routes — Register the cached release-notice fragment at ``GET /updates/notice``.
register_update_routes
register_update_routes(
app: FastAPI,
available_update: AvailableUpdate,
) → NoneRegister the cached release-notice fragment at GET /updates/notice.
The route performs no network request. It reads the latest cached result
through available_update and returns 204 when no newer release is
available. Otherwise it returns an escaped HTML notice whose external links
use safe new-tab attributes.
Parameters
app
type: FastAPI
FastAPI application receiving the route.
available_update
type: AvailableUpdate
Resolver for currently cached release metadata.