feat: Update endpoint books
This commit is contained in:
parent
6693913274
commit
8f7f0fc48b
@ -1,14 +1,13 @@
|
|||||||
from fastapi import APIRouter, Depends
|
db
|
||||||
from sqlalchemy.orm import Session
|
from models.book import Books
|
||||||
from typing import List
|
from schemas.book import BookSchema
|
||||||
from core.database import get_db
|
from helpers.book_helpers import get_all_books
|
||||||
from models.book import Book
|
|
||||||
from schemas.book import BookSchema
|
router = APIRouter()
|
||||||
from helpers.book_helpers import get_all_books
|
|
||||||
|
#my name is lulu
|
||||||
router = APIRouter()
|
|
||||||
|
@router.get("/books", response_model=List[BookSchema])
|
||||||
@router.get("/books", response_model=List[BookSchema])
|
async def get_all_books_endpoint(db: Session = Depends(get_db)):
|
||||||
async def get_all_books_endpoint(db: Session = Depends(get_db)):
|
books = get_all_books(db)
|
||||||
books = get_all_books(db)
|
|
||||||
return books
|
return books
|
Loading…
x
Reference in New Issue
Block a user