diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-04-16 14:05:17 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-04-16 14:05:17 -0500 |
commit | 7b67a5f28d327c665be64a0091b0a46fedf3e99a (patch) | |
tree | 2b9d04913a4a10e6a5cb86a187d83ad2c93ceeac /src/api.rs | |
parent | e607eb77d4253adfb15c8a4ce08684e16ae96674 (diff) |
style: clean up imports
Diffstat (limited to 'src/api.rs')
-rw-r--r-- | src/api.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) } |