summaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api.rs b/src/api.rs
index 8cf66ea..8dfd2ca 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -3,7 +3,7 @@ use std::collections::HashMap;
use axum::{extract::State, response::IntoResponse, Json};
use serde::{Deserialize, Serialize};
-use crate::{service::Services, Error, Status};
+use crate::{service::Services, Status};
pub mod services;
@@ -13,11 +13,11 @@ pub fn router() -> axum::Router<Services> {
axum::Router::new()
.route("/healthcheck", get(healthcheck))
.merge(services::router())
- .fallback(fallback)
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Health {
+ #[serde(flatten)]
pub status: Status,
pub checks: HashMap<String, Status>,
}
@@ -55,7 +55,3 @@ pub async fn healthcheck(State(services): State<Services>) -> Health {
Health { status, checks }
}
-
-pub async fn fallback(uri: axum::http::Uri) -> Error {
- Error::RouteNotFound(uri)
-}