From 3c57907eea579bae1b95949873478fa4bbea7d54 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 21 Mar 2025 20:54:50 +0100 Subject: [PATCH] Update code in endpoints/people.get.py --- endpoints/people.get.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 endpoints/people.get.py diff --git a/endpoints/people.get.py b/endpoints/people.get.py new file mode 100644 index 0000000..7524cbd --- /dev/null +++ b/endpoints/people.get.py @@ -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 + } \ No newline at end of file