fix tests
This commit is contained in:
@@ -3,24 +3,25 @@ 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 fastapi import APIRouter, Depends
|
||||
|
||||
from src.core.SeriesApp import SeriesApp
|
||||
from src.server.utils.dependencies import get_series_app
|
||||
from src.config.settings import settings
|
||||
from src.server.utils.dependencies import _series_app
|
||||
|
||||
router = APIRouter(prefix="/health", tags=["health"])
|
||||
|
||||
|
||||
@router.get("")
|
||||
async def health_check(
|
||||
series_app: Optional[SeriesApp] = Depends(get_series_app)
|
||||
):
|
||||
"""Health check endpoint for monitoring."""
|
||||
async def health_check():
|
||||
"""Health check endpoint for monitoring.
|
||||
|
||||
This endpoint does not depend on anime_directory configuration
|
||||
and should always return 200 OK for basic health monitoring.
|
||||
"""
|
||||
return {
|
||||
"status": "healthy",
|
||||
"service": "aniworld-api",
|
||||
"version": "1.0.0",
|
||||
"series_app_initialized": series_app is not None
|
||||
"series_app_initialized": _series_app is not None,
|
||||
"anime_directory_configured": bool(settings.anime_directory)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user