mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-19 01:18:31 +08:00
update health route
This commit is contained in:
parent
ce4fb8ce20
commit
b044608b25
@ -1,13 +1,11 @@
|
|||||||
use actix_web::get;
|
|
||||||
use actix_web::{web, HttpResponse};
|
use actix_web::{web, HttpResponse};
|
||||||
|
|
||||||
use crate::error::ResponseError;
|
use crate::error::ResponseError;
|
||||||
|
|
||||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||||
cfg.service(get_health);
|
cfg.route("/healts", web::get().to(get_health));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/health")]
|
|
||||||
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
async fn get_health() -> Result<HttpResponse, ResponseError> {
|
||||||
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
|
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user