diff --git a/app/api/__init__.py b/app/api/__init__.py index e69de29..cde1071 100644 --- a/app/api/__init__.py +++ b/app/api/__init__.py @@ -0,0 +1,9 @@ +from fastapi import APIRouter + +from app.api.health import health_router +from app.api.v1 import v1_router + +api_router = APIRouter() + +api_router.include_router(v1_router) +api_router.include_router(health_router) diff --git a/app/api/health.py b/app/api/health.py new file mode 100644 index 0000000..e2fcf07 --- /dev/null +++ b/app/api/health.py @@ -0,0 +1,9 @@ +from fastapi import APIRouter +from fastapi import Response + +health_router = APIRouter() + + +@health_router.get("/_health") +async def healthcheck() -> Response: + return Response(status_code=200) diff --git a/app/init_api.py b/app/init_api.py index 7908df4..dd8e321 100644 --- a/app/init_api.py +++ b/app/init_api.py @@ -1,12 +1,12 @@ from fastapi import FastAPI -from app.api.v1 import v1_router +from app.api import api_router def init_api() -> FastAPI: app = FastAPI() - app.include_router(v1_router) + app.include_router(api_router) return app