feat: Add new endpoints/books.get.py endpoint for User 🚀 📦 with updated dependencies

This commit is contained in:
Backend IM Bot 2025-04-26 08:18:14 +00:00
parent 681f35d3fa
commit ecd5d71672
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,15 @@
from fastapi import APIRouter, Depends
from typing import List
from sqlalchemy.orm import Session
from core.database import get_db
from schemas.book import BookSchema
from helpers.book_helpers import get_all_books
router = APIRouter()
@router.get("/books", status_code=200, response_model=List[BookSchema])
async def get_books(
db: Session = Depends(get_db)
):
books = get_all_books(db)
return books

View File

@ -7,3 +7,6 @@ sqlalchemy>=1.4.0
python-dotenv>=0.19.0
bcrypt>=3.2.0
alembic>=1.13.1
jose
passlib
pydantic