Revert "Merge pull request 'add updates to show bedir' (#14) from another into main"
This reverts commit99f611b3d0, reversing changes made tod5588dd055.
This commit is contained in:
parent
99f611b3d0
commit
83389e0c10
6 changed files with 210 additions and 118 deletions
|
|
@ -1,4 +1,7 @@
|
|||
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",
|
||||
|
|
@ -7,7 +10,9 @@ router = APIRouter(
|
|||
dependencies=[],
|
||||
)
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def get_items():
|
||||
return {"message": "List of items"}
|
||||
@router.get('/profile', response_model=UserProfile)
|
||||
async def get_user_profile(
|
||||
current_user: Annotated[UserProfile, Depends(get_current_active_user)]
|
||||
) -> UserProfile:
|
||||
|
||||
return current_user
|
||||
Loading…
Add table
Add a link
Reference in a new issue