You've already forked RekomenciBackend
fix(): proper config dependency resolution
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
config.toml
|
||||
docker-compose.yml
|
||||
.idea
|
||||
firebase.json
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
||||
@@ -43,7 +43,7 @@ LOG_CONFIG: Final = {
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
||||
configuration: Configuration = app.state.dishka_container.context[Configuration]
|
||||
configuration: Configuration = await app.state.dishka_container.get(Configuration)
|
||||
cred = credentials.Certificate(configuration.firebase.certificate_path)
|
||||
firebase_admin.initialize_app(cred)
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user