Files
life-echo/api/app/features/user/repo.py

8 lines
205 B
Python

from sqlalchemy.ext.asyncio import AsyncSession
from app.features.user.models import User
async def get_user_by_id(user_id: str, db: AsyncSession) -> User | None:
return await db.get(User, user_id)