From 23204c66718510714804284120d00b657f0610fe Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 09:29:56 +0100 Subject: [PATCH] Update code in endpoints/females.get.py --- endpoints/females.get.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 endpoints/females.get.py diff --git a/endpoints/females.get.py b/endpoints/females.get.py new file mode 100644 index 0000000..3125a77 --- /dev/null +++ b/endpoints/females.get.py @@ -0,0 +1,18 @@ +# Entity: Female + +from fastapi import APIRouter, Depends, status +from sqlalchemy.orm import Session +from typing import List +from core.database import get_db +from models.female import Female +from schemas.female import FemaleSchema +from helpers.female_helpers import get_all_females + +router = APIRouter() + +@router.get("/females", status_code=200, response_model=List[FemaleSchema]) +async def get_females( + db: Session = Depends(get_db) +): + females = get_all_females(db) + return females \ No newline at end of file