Files

22 lines
535 B
Python
Raw Permalink Normal View History

2026-09-07 19:32:02 +05:30
"""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"),
]