2025-03-28 09:28:54 +01:00

15 lines
369 B
Python

# Entity: Male
from fastapi import APIRouter, Depends, status
from typing import List
from schemas.male import MaleSchema
from helpers.male_helpers import get_all_males
router = APIRouter()
@router.get("/males", status_code=200, response_model=List[MaleSchema])
async def get_males(
db: Session = Depends(get_db)
):
males = get_all_males(db)
return males