fix: fastAPI user warning due to unsupported use of api_route
This commit is contained in:
@@ -77,9 +77,13 @@ router_public = APIRouter()
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router_public.api_route("/ping", methods=["GET", "HEAD"], response_model=Ping, tags=["Info"])
|
||||
@router_public.get("/ping", response_model=Ping, tags=["Info"])
|
||||
@router_public.head("/ping", response_model=Ping, tags=["Info"])
|
||||
def ping():
|
||||
"""simple ping"""
|
||||
"""simple ping to check if API is responsive
|
||||
|
||||
Performa no internal checks, just returns poing.
|
||||
"""
|
||||
return {"status": "pong"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user