Skip to main content

weft_core/api/
health.rs

1use axum::Json;
2use serde::Serialize;
3
4#[derive(Serialize)]
5pub struct HealthResponse {
6    pub status: String,
7    pub version: String,
8}
9
10pub async fn health() -> Json<HealthResponse> {
11    Json(HealthResponse {
12        status: "ok".into(),
13        version: env!("CARGO_PKG_VERSION").into(),
14    })
15}