japanuy-3ee98h/endpoints/people.get.py
2025-03-21 20:55:30 +01:00

13 lines
332 B
Python

from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db
router = APIRouter()
@router.get("/people")
async def people_handler():
"""Fetch list of people"""
people = list(fake_users_db.values())
return {
"message": "People fetched successfully",
"data": people
}