use axum::Json;
use serde::Serialize;

#[derive(Serialize)]
pub struct HealthResponse {
  status: &'static str,
  message: &'static str,
  version: &'static str,
}

pub async fn healthz() -> Json<HealthResponse> {
  Json(HealthResponse {
    status: "ok",
    message: "CleanCopy server is alive and cleaning clipboards.",
    version: env!("CARGO_PKG_VERSION"),
  })
}
