type cheking

This commit is contained in:
IluaAir
2025-08-11 10:07:56 +03:00
parent 644d5614b9
commit ddc38dbd07
5 changed files with 27 additions and 20 deletions

View File

@@ -1,15 +1,15 @@
from typing import Annotated, AsyncGenerator
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
from src.core.database import async_session_maker
from src.core.db_manager import DBManager
from src.core.interfaces import IUOWDB
async def get_db() -> AsyncGenerator[AsyncSession, None]:
async def get_db() -> AsyncGenerator[IUOWDB, None]:
async with DBManager(async_session_maker) as db:
yield db
sessionDep = Annotated[AsyncSession, Depends(get_db)]
sessionDep = Annotated[IUOWDB, Depends(get_db)]