Skip to content

Commit

Permalink
[feat]: Added health route
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sunglasses committed Oct 19, 2023
1 parent f9e30e8 commit 809231a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bloom/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

from .auth.endpoints import router as auth_router
from .user.endpoints import router as user_router
from .health.endpoints import router as health_router

router = APIRouter(prefix="/api/v1")

router.include_router(health_router)

router.include_router(auth_router)

router.include_router(user_router)
Empty file added bloom/health/__init__.py
Empty file.
13 changes: 13 additions & 0 deletions bloom/health/endpoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from fastapi import APIRouter

router = APIRouter(tags=["health"])


@router.get("/healthz")
async def healthz() -> dict[str, str]:
return {"status": "ok"}


@router.get("/readyz")
async def readyz() -> dict[str, str]:
return {"status": "ok"}

0 comments on commit 809231a

Please sign in to comment.