diff --git a/endpoints/names.get.py b/endpoints/names.get.py new file mode 100644 index 0000000..749d695 --- /dev/null +++ b/endpoints/names.get.py @@ -0,0 +1,15 @@ +# Entity: Name + +from fastapi import APIRouter, Depends, status +from typing import List +from schemas.name import NameSchema +from helpers.name_helpers import get_girl_names + +router = APIRouter() + +@router.get("/names", status_code=200, response_model=List[NameSchema]) +async def get_girl_names_endpoint( + db: Session = Depends(get_db) +): + girl_names = get_girl_names(db) + return girl_names \ No newline at end of file