From: Michael Tremer Date: Thu, 10 Jul 2025 14:53:42 +0000 (+0000) Subject: api: Pass the backend to the app X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc567bd241097771bd39cb70cbed0907a51639e1;p=pbs.git api: Pass the backend to the app Signed-off-by: Michael Tremer --- diff --git a/src/api/__init__.py b/src/api/__init__.py index 813f9e23..eb0a3a70 100644 --- a/src/api/__init__.py +++ b/src/api/__init__.py @@ -37,6 +37,9 @@ app = fastapi.FastAPI( debug = True, ) +# Pass the backend to the app +app.state.backend = backend + @app.middleware("http") async def add_process_time_header(request: fastapi.Request, call_next): """