12 lines
288 B
Python
12 lines
288 B
Python
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
|
|
|
|
|