2025-03-20 15:47:06 +01:00

13 lines
341 B
Python

from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_books_db
router = APIRouter()
@router.get("/books")
async def get_books_handler():
"""Get all books in the library"""
books = list(fake_books_db.values())
return {
"message": "Books retrieved successfully",
"data": books
}