Update code in endpoints/people.get.py
This commit is contained in:
parent
97a060a2cf
commit
3c57907eea
13
endpoints/people.get.py
Normal file
13
endpoints/people.get.py
Normal file
@ -0,0 +1,13 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from core.database import fake_users_db
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/people")
|
||||
async def people_handler():
|
||||
"""Get list of people"""
|
||||
people = list(fake_users_db.values())
|
||||
return {
|
||||
"message": "People fetched successfully",
|
||||
"data": people
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user