15 lines
395 B
Python
15 lines
395 B
Python
# 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 |