Update code in endpoints/females.get.py
This commit is contained in:
parent
342d8eb6ff
commit
c5f5f23f9b
18
endpoints/females.get.py
Normal file
18
endpoints/females.get.py
Normal 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
|
Loading…
x
Reference in New Issue
Block a user