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, 4 insertions, 4 deletions
diff --git a/src/api.rs b/src/api.rs
index f6dd76a..a35fba5 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -1,5 +1,3 @@
-use axum::{http::Uri, response::IntoResponse, routing::get};
-
use crate::state::AppState;
pub mod account;
@@ -7,6 +5,8 @@ pub mod error;
pub mod users;
pub fn router() -> axum::Router<AppState> {
+ use axum::routing::get;
+
axum::Router::new()
.nest("/account", account::router())
.merge(users::router())
@@ -14,11 +14,11 @@ pub fn router() -> axum::Router<AppState> {
.fallback(fallback)
}
-pub async fn healthcheck() -> impl IntoResponse {
+pub async fn healthcheck() -> &'static str {
"success"
}
-pub async fn fallback(uri: Uri) -> impl IntoResponse {
+pub async fn fallback(uri: axum::http::Uri) -> self::error::Error {
self::error::Error::RouteNotFound(uri)
}