PicoBot/src/gateway/http.rs

16 lines
305 B
Rust

use axum::Json;
use serde::Serialize;
#[derive(Serialize)]
pub struct HealthResponse {
status: String,
version: String,
}
pub async fn health() -> Json<HealthResponse> {
Json(HealthResponse {
status: "ok".to_string(),
version: env!("CARGO_PKG_VERSION").to_string(),
})
}