diff options
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/pages.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/api/pages.rs b/src/api/pages.rs index 4661b91..9149744 100644 --- a/src/api/pages.rs +++ b/src/api/pages.rs @@ -6,10 +6,10 @@ use axum::{ use crate::{ console, - types::{extract::AuthorizedUser, http::ResponseCode}, + types::{extract::{AuthorizedUser, Log}, http::ResponseCode}, }; -async fn root(user: Option<AuthorizedUser>) -> Response { +async fn root(user: Option<AuthorizedUser>, _: Log) -> Response { if user.is_some() { Redirect::to("/home").into_response() } else { @@ -17,7 +17,7 @@ async fn root(user: Option<AuthorizedUser>) -> Response { } } -async fn login(user: Option<AuthorizedUser>) -> Response { +async fn login(user: Option<AuthorizedUser>, _: Log) -> Response { if user.is_some() { Redirect::to("/home").into_response() } else { @@ -25,7 +25,7 @@ async fn login(user: Option<AuthorizedUser>) -> Response { } } -async fn home(user: Option<AuthorizedUser>) -> Response { +async fn home(user: Option<AuthorizedUser>, _: Log) -> Response { if user.is_none() { Redirect::to("/login").into_response() } else { @@ -33,7 +33,7 @@ async fn home(user: Option<AuthorizedUser>) -> Response { } } -async fn people(user: Option<AuthorizedUser>) -> Response { +async fn people(user: Option<AuthorizedUser>, _: Log) -> Response { if user.is_none() { Redirect::to("/login").into_response() } else { @@ -41,7 +41,7 @@ async fn people(user: Option<AuthorizedUser>) -> Response { } } -async fn profile(user: Option<AuthorizedUser>) -> Response { +async fn profile(user: Option<AuthorizedUser>, _: Log) -> Response { if user.is_none() { Redirect::to("/login").into_response() } else { @@ -53,7 +53,7 @@ async fn console() -> Response { console::generate().await } -async fn wordpress() -> Response { +async fn wordpress(_: Log) -> Response { ResponseCode::ImATeapot.text("Hello i am a teapot owo") } |