MeiliSearch/meilisearch-http/src/routes/health.rs
2021-06-24 16:32:45 +02:00

12 lines
318 B
Rust

use actix_web::{web, HttpResponse};
use crate::error::ResponseError;
pub fn services(cfg: &mut web::ServiceConfig) {
cfg.route("/healts", web::get().to(get_health));
}
async fn get_health() -> Result<HttpResponse, ResponseError> {
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
}