secure media endpoints

This commit is contained in:
2026-05-17 21:48:40 +02:00
parent f1abf03b35
commit b2cf1c4698
3 changed files with 116 additions and 44 deletions
+4 -2
View File
@@ -12,8 +12,10 @@ engine = create_engine(SQLALCHEMY_DATABASE_URL)
SessionLocal = sessionmaker(bind=engine)
def get_db() -> Generator:
def get_db() -> Generator[Session, None, None]:
""" """
with SessionLocal() as db:
yield db
SessionDep: type[Session] = Annotated[Session, Depends(get_db)]
SessionDep = Annotated[Session, Depends(get_db)]