tech-pm-tn9qa7/endpoints/books.get.py
2025-04-11 09:38:08 +00:00

13 lines
335 B
Python

db
from models.book import Books
from schemas.book import BookSchema
from helpers.book_helpers import get_all_books
router = APIRouter()
#my name is lulu
@router.get("/books", response_model=List[BookSchema])
async def get_all_books_endpoint(db: Session = Depends(get_db)):
books = get_all_books(db)
return books