20 lines
403 B
Python
20 lines
403 B
Python
from fastapi import APIRouter, status
|
|
from typing import List
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/names", status_code=status.HTTP_200_OK)
|
|
async def get_fruit_names() -> List[str]:
|
|
fruits = [
|
|
"Apple",
|
|
"Banana",
|
|
"Orange",
|
|
"Mango",
|
|
"Pineapple",
|
|
"Grape",
|
|
"Strawberry",
|
|
"Blueberry",
|
|
"Peach",
|
|
"Pear"
|
|
]
|
|
return fruits |