Update code in endpoints/route.get.py

This commit is contained in:
Backend IM Bot 2025-03-21 16:06:42 +00:00
parent 6b7d7e2733
commit 33ce7a2641

View File

@ -0,0 +1,22 @@
from fastapi import APIRouter, HTTPException
from fastapi.requests import Request
router = APIRouter()
routes = [] # In-memory storage
@router.get("/route")
async def get_route(request: Request):
"""Demo route endpoint"""
if request.method != "GET":
raise HTTPException(status_code=405, detail="Method not allowed")
return {
"message": "Route retrieved successfully",
"method": "GET",
"_verb": "get",
"features": {
"rate_limit": 100,
"expires_in": 3600
}
}