12 lines
378 B
Python
12 lines
378 B
Python
from fastapi import APIRouter
|
|
from typing import List
|
|
from schemas.fruit import FruitNamesResponse
|
|
from helpers.fruit_helpers import get_all_fruit_names
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/names", status_code=200, response_model=List[FruitNamesResponse])
|
|
async def get_fruit_names():
|
|
"""Get all fruit names"""
|
|
fruit_names = get_all_fruit_names()
|
|
return fruit_names |