from App.schemas import AppException | |
from .models import User | |
async def get_current_user(user_id: int): | |
"""Get current user by ID""" | |
user = await User.get_or_none(id=user_id) | |
if not user: | |
raise AppException(status_code=404, detail="User not found") | |
return user ## can you implement this function |