feat: enhance health check with application state and initialization status

This commit is contained in:
GW_MC
2025-12-19 10:24:47 +08:00
parent 66b29b96ee
commit 8111aaf672
10 changed files with 122 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ use axum::{Router, response::IntoResponse, routing::any};
pub fn get_api_router(state: Arc<AppState>) -> Router {
Router::new()
.nest("/health", health::get_health_router())
.nest("/health", health::get_health_router(state.clone()))
.merge(auth::get_basic_auth_router(state.clone()))
.merge(restricted::get_restricted_router(state.clone()))
// explicit fallback for unmatched API routes