MeiliSearch/meilisearch-http/src/routes/health.rs
marin postma 8e4928c7ea
fix tests
2021-06-24 16:36:22 +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("/health", web::get().to(get_health));
}
async fn get_health() -> Result<HttpResponse, ResponseError> {
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
}