Files
life-echo/api/app/features/auth/deps.py

17 lines
474 B
Python

"""Auth feature dependencies: get_auth_service."""
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.db import get_async_db
from app.core.dependencies import get_sms_sender
from app.features.auth.service import AuthService
from app.ports.sms import SmsSender
def get_auth_service(
db: AsyncSession = Depends(get_async_db),
sms: SmsSender = Depends(get_sms_sender),
) -> AuthService:
return AuthService(db=db, sms=sms)