mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-06-13 08:09:50 +02:00
15 lines
371 B
Rust
15 lines
371 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().body(payload.to_string()))
|
|
}
|