9 lines
219 B
Python
9 lines
219 B
Python
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/fruits", status_code=200)
|
|
async def get_fruits():
|
|
"""Get all fruits"""
|
|
fruits = ["apple", "banana", "orange", "grape", "kiwi"]
|
|
return fruits |