|
|
@ -10,14 +10,11 @@ class Item(BaseModel): |
|
|
description: Union[str, None] = None |
|
|
description: Union[str, None] = None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foo_item = Item(id="foo", title="Foo", description="There goes my hero") |
|
|
|
|
|
bar_item = Item(id="bar", title="Bar", description="The bartenders") |
|
|
|
|
|
|
|
|
|
|
|
fake_secret_token = "coneofsilence" |
|
|
fake_secret_token = "coneofsilence" |
|
|
|
|
|
|
|
|
fake_db: dict[str, Item] = { |
|
|
fake_db: dict[str, Item] = { |
|
|
"foo": foo_item, |
|
|
"foo": Item(id="foo", title="Foo", description="There goes my hero"), |
|
|
"bar": bar_item, |
|
|
"bar": Item(id="bar", title="Bar", description="The bartenders"), |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
app = FastAPI() |
|
|
app = FastAPI() |
|
|
|