✨ feat: Add new endpoints/books.get.py endpoint for User 🚀 📦 with updated dependencies
This commit is contained in:
parent
681f35d3fa
commit
ecd5d71672
@ -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
|
@ -7,3 +7,6 @@ sqlalchemy>=1.4.0
|
||||
python-dotenv>=0.19.0
|
||||
bcrypt>=3.2.0
|
||||
alembic>=1.13.1
|
||||
jose
|
||||
passlib
|
||||
pydantic
|
||||
|
Loading…
x
Reference in New Issue
Block a user