Aniworld/src/server/controllers/health_controller.py
2025-10-12 23:06:29 +02:00

31 lines
817 B
Python

"""
Health check controller for monitoring and status endpoints.
This module provides health check endpoints for application monitoring.
"""
from typing import Optional
from fastapi import APIRouter
from src.core.SeriesApp import SeriesApp
router = APIRouter(prefix="/health", tags=["health"])
def get_series_app() -> Optional[SeriesApp]:
"""Get the current SeriesApp instance."""
# This will be replaced with proper dependency injection
from src.server.fastapi_app import series_app
return series_app
@router.get("")
async def health_check():
"""Health check endpoint for monitoring."""
series_app = get_series_app()
return {
"status": "healthy",
"service": "aniworld-api",
"version": "1.0.0",
"series_app_initialized": series_app is not None
}