mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-09-22 00:21:45 +02:00
15 lines
359 B
Rust
15 lines
359 B
Rust
use actix_web::get;
|
|
use actix_web::{web, HttpResponse};
|
|
|
|
use crate::error::ResponseError;
|
|
|
|
pub fn services(cfg: &mut web::ServiceConfig) {
|
|
cfg.service(get_health);
|
|
}
|
|
|
|
#[get("/health")]
|
|
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
|
let payload = serde_json::json!({ "status": "available" });
|
|
Ok(HttpResponse::Ok().json(payload))
|
|
}
|