diff --git a/endpoints/tk.post.py b/endpoints/tk.post.py new file mode 100644 index 0000000..6d368b1 --- /dev/null +++ b/endpoints/tk.post.py @@ -0,0 +1,14 @@ +from fastapi import APIRouter, Depends +from models.book import Book +from schemas.book import BookCreate +from helpers.book_helpers import create_book + +router = APIRouter() + +@router.post("/tk", status_code=201) +async def generate_book( + book_data: BookCreate = Depends(), + db: Session = Depends(get_db) +): + book = create_book(db, book_data) + return book \ No newline at end of file