mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Update healthcheck
This commit is contained in:
@@ -1,13 +1,7 @@
|
|||||||
from fastapi import APIRouter, Depends
|
from fastapi import APIRouter
|
||||||
|
|
||||||
from app.depends import check_token
|
|
||||||
|
|
||||||
|
|
||||||
healtcheck_router = APIRouter(
|
healtcheck_router = APIRouter(tags=["healthcheck"])
|
||||||
prefix="/api/v1",
|
|
||||||
tags=["healthcheck"],
|
|
||||||
dependencies=[Depends(check_token)],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@healtcheck_router.get("/healthcheck")
|
@healtcheck_router.get("/healthcheck")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import httpx
|
|||||||
|
|
||||||
|
|
||||||
response = httpx.get(
|
response = httpx.get(
|
||||||
"http://localhost:8080/api/v1/healthcheck",
|
"http://localhost:8080/healthcheck",
|
||||||
headers={"Authorization": os.environ["API_KEY"]},
|
headers={"Authorization": os.environ["API_KEY"]},
|
||||||
)
|
)
|
||||||
print(f"HEALTHCHECK STATUS: {response.status_code}")
|
print(f"HEALTHCHECK STATUS: {response.status_code}")
|
||||||
|
|||||||
Reference in New Issue
Block a user