]> git.ipfire.org Git - pbs.git/commitdiff
api: Pass the backend to the app
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jul 2025 14:53:42 +0000 (14:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jul 2025 14:53:42 +0000 (14:53 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/api/__init__.py

index 813f9e23009b66784027e9ad53b63a16adf6917b..eb0a3a703f4d6320726102d3b3c737a1c3b4bd6e 100644 (file)
@@ -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):
        """