16 lines
478 B
Python
16 lines
478 B
Python
from fastapi import APIRouter, Depends
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
|
|
from app.core.database import get_db
|
|
from app.models.health import HealthCheck
|
|
|
|
health_router = APIRouter()
|
|
|
|
|
|
@health_router.get("/health", response_model=HealthCheck, tags=["health"])
|
|
async def health(db: AsyncSession = Depends(get_db)):
|
|
"""
|
|
Health check endpoint to verify API is running properly.
|
|
"""
|
|
return {"status": "ok", "database": "connected", "api_version": "v1"}
|