big-man-fwu721/endpoints/females.get.py
2025-03-28 09:43:48 +01:00

18 lines
492 B
Python

# 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