22 lines
535 B
Python
22 lines
535 B
Python
"""One demo resource. Its rows mirror the frontend seed, so Preview and the
|
|
deployed app render the same screen. Replace both together."""
|
|
|
|
from fastapi import APIRouter
|
|
from pydantic import BaseModel
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
class Item(BaseModel):
|
|
id: int
|
|
name: str
|
|
status: str
|
|
|
|
|
|
@router.get("/items", response_model=list[Item])
|
|
def list_items() -> list[Item]:
|
|
return [
|
|
Item(id=1, name="Draft the launch checklist", status="in progress"),
|
|
Item(id=2, name="Review onboarding copy", status="todo"),
|
|
]
|