diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-29 00:35:06 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-29 00:35:06 -0500 |
commit | 7805c730e8ead9cd421f45d4720fd7f4062675e6 (patch) | |
tree | a46ec6de28c688f7961e6327e075925a8f50071c /src/api/pages.rs | |
parent | reverse proxy ip checking (diff) | |
download | xssbook-7805c730e8ead9cd421f45d4720fd7f4062675e6.tar.gz xssbook-7805c730e8ead9cd421f45d4720fd7f4062675e6.tar.bz2 xssbook-7805c730e8ead9cd421f45d4720fd7f4062675e6.zip |
no mass rerendering html plus logging fix
Diffstat (limited to 'src/api/pages.rs')
-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") } |