diff --git a/src/health.rs b/src/health.rs new file mode 100644 index 0000000..5b8f00e --- /dev/null +++ b/src/health.rs @@ -0,0 +1,13 @@ +use rapina::prelude::*; +use rapina::schemars; + +#[public] +#[get("/health")] +pub async fn health() -> Result> { + Ok(Json(HealthResponse { status: "ok" })) +} + +#[derive(Serialize, JsonSchema)] +pub struct HealthResponse { + status: &'static str, +} diff --git a/src/lib.rs b/src/lib.rs index e003860..73072d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ pub mod dashboard; pub mod entity; pub mod errors; pub mod github; +mod health; mod merge_events; mod pull_requests; pub mod queue;