We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 014e144 commit 881aa85Copy full SHA for 881aa85
code/function/fastapp/api/v1/endpoints/heartbeat.py
@@ -1,6 +1,7 @@
1
from typing import Any
2
3
-from fastapi import APIRouter
+from fastapi import APIRouter, Depends
4
+from fastapp.health.validate_request import verify_health_auth_header
5
from fastapp.models.heartbeat import HearbeatResult
6
from fastapp.utils import setup_logging
7
@@ -9,7 +10,12 @@
9
10
router = APIRouter()
11
12
-@router.get("/heartbeat", response_model=HearbeatResult, name="heartbeat")
13
+@router.get(
14
+ "/heartbeat",
15
+ response_model=HearbeatResult,
16
+ name="heartbeat",
17
+ dependencies=[Depends(verify_health_auth_header)],
18
+)
19
async def get_hearbeat() -> Any:
20
logger.info("Received Heartbeat Request")
21
return HearbeatResult(isAlive=True)
0 commit comments