Update code in endpoints/books.get.py
This commit is contained in:
parent
cacb39b3bb
commit
85c8bb081b
@ -1,12 +1,10 @@
|
|||||||
from fastapi import APIRouter, status
|
from fastapi import APIRouter, status
|
||||||
from typing import List
|
from typing import List, Dict
|
||||||
from schemas.book import BookSchema
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@router.get("/books", status_code=status.HTTP_200_OK, response_model=List[BookSchema])
|
@router.get("/books", status_code=status.HTTP_200_OK, response_model=List[Dict])
|
||||||
async def get_books():
|
async def get_books():
|
||||||
"""Get all books"""
|
|
||||||
books = [
|
books = [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user