feat: Update endpoint library
This commit is contained in:
parent
082a188521
commit
9e96e90570
@ -1,5 +1,4 @@
|
|||||||
# Entity: Book, Author
|
|
||||||
```python
|
|
||||||
from fastapi import APIRouter, Depends, HTTPException, status
|
from fastapi import APIRouter, Depends, HTTPException, status
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
from typing import List
|
from typing import List
|
||||||
@ -16,4 +15,3 @@ async def get_books_by_authors(
|
|||||||
):
|
):
|
||||||
books = db.query(Book).join(Author).all()
|
books = db.query(Book).join(Author).all()
|
||||||
return books
|
return books
|
||||||
```
|
|
Loading…
x
Reference in New Issue
Block a user