18 lines
No EOL
488 B
Python
18 lines
No EOL
488 B
Python
from .models import UserProfile
|
|
from fastapi import APIRouter, Depends
|
|
from typing import Annotated
|
|
from ..auth.models import get_current_active_user
|
|
|
|
router = APIRouter(
|
|
prefix="/items",
|
|
tags=["items"],
|
|
responses={404: {"description": "Not found"}},
|
|
dependencies=[],
|
|
)
|
|
|
|
@router.get('/profile', response_model=UserProfile)
|
|
async def get_user_profile(
|
|
current_user: Annotated[UserProfile, Depends(get_current_active_user)]
|
|
) -> UserProfile:
|
|
|
|
return current_user |