Update code in endpoints/books.get.py
This commit is contained in:
parent
8e30fbe9bc
commit
803f5bdd39
@ -0,0 +1,17 @@
|
|||||||
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
|
books = [] # In-memory storage
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.get("/books")
|
||||||
|
async def get_books():
|
||||||
|
"""Get all books endpoint"""
|
||||||
|
return {
|
||||||
|
"message": "Books retrieved successfully",
|
||||||
|
"books": books,
|
||||||
|
"features": {
|
||||||
|
"rate_limit": 100,
|
||||||
|
"expires_in": 3600
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user