moadim 1.7.1

Loop engine for AI agents — routines over REST, MCP, and a built-in web UI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! `GET /health` HTTP handler.

use super::logic;
use axum::{extract::State, Json};
use logic::HealthResponse;

/// `GET /health` — health check with uptime.
#[utoipa::path(get, path = "/health",
    responses((status = 200, body = HealthResponse)))]
pub async fn health(State(state): State<crate::routes::http::AppState>) -> Json<HealthResponse> {
    Json(logic::build(state.uptime_start))
}

#[cfg(test)]
#[path = "http_tests.rs"]
mod http_tests;