This commit is contained in:
bdrtr 2025-05-05 15:02:44 +03:00
parent 7281477269
commit 8cefa60d3a
6 changed files with 33 additions and 1 deletions

18
items/router.py Normal file
View file

@ -0,0 +1,18 @@
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