Skip to content

Commit 8da27be

Browse files
committed
Fix: update example DB
1 parent 22b6d81 commit 8da27be

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎FastAPI/book_library_api/main.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ class Book(BaseModel):
4848
# In-memory data storage (replace with database in production)
4949
books_db: list[Book] = [
5050
Book(book_id=1, title="Satanás", author="Mario Mendoza", year=2002),
51-
Book(book_id=2, title="Satanás", author="Mario Mendoza", year=2002),
52-
Book(book_id=3, title="Satanás", author="Mario Mendoza", year=2002),
51+
Book(book_id=2, title="Cien años de soledad", author="Gabriel Garcia Marquez", year=1967),
52+
Book(book_id=3, title="El olvido que seremos", author="Hector Abad Faciolince", year=2006),
53+
Book(book_id=4, title="Lo que no tiene nombre ", author="Piedad Bonnett", year=2013),
5354
]
5455

5556
# Auto-increment ID counter
56-
next_book_id = 4
57+
next_book_id = 5
5758

5859

5960
@app.get("/", tags=["Root"])

0 commit comments

Comments
 (0)