Update code in endpoints/females.get.py

This commit is contained in:
Backend IM Bot 2025-03-28 09:46:37 +01:00
parent e230257513
commit ad12d5facb

18
endpoints/females.get.py Normal file
View File

@ -0,0 +1,18 @@
# Entity: Female
from fastapi import APIRouter, Depends, status
from typing import List
from core.database import get_db
from sqlalchemy.orm import Session
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