API/app/user.py

12 lines
288 B
Python
Raw Normal View History

2022-01-12 07:48:18 +00:00
from fastapi import Depends, APIRouter
from app.models import User
from app.auth import get_current_active_user
router = APIRouter()
@router.get("/users/me/", response_model=User)
async def read_users_me(current_user: User = Depends(get_current_active_user)):
return current_user