update health route

This commit is contained in:
marin postma 2021-06-24 15:08:45 +02:00
parent ce4fb8ce20
commit b044608b25
No known key found for this signature in database
GPG Key ID: 6088B7721C3E39F9
1 changed files with 1 additions and 3 deletions

View File

@ -1,13 +1,11 @@
use actix_web::get;
use actix_web::{web, HttpResponse};
use crate::error::ResponseError;
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> {
Ok(HttpResponse::Ok().json(serde_json::json!({ "status": "available" })))
}