From 7805c730e8ead9cd421f45d4720fd7f4062675e6 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 29 Jan 2023 00:35:06 -0500 Subject: no mass rerendering html plus logging fix --- src/api/pages.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/api/pages.rs') 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) -> Response { +async fn root(user: Option, _: Log) -> Response { if user.is_some() { Redirect::to("/home").into_response() } else { @@ -17,7 +17,7 @@ async fn root(user: Option) -> Response { } } -async fn login(user: Option) -> Response { +async fn login(user: Option, _: Log) -> Response { if user.is_some() { Redirect::to("/home").into_response() } else { @@ -25,7 +25,7 @@ async fn login(user: Option) -> Response { } } -async fn home(user: Option) -> Response { +async fn home(user: Option, _: Log) -> Response { if user.is_none() { Redirect::to("/login").into_response() } else { @@ -33,7 +33,7 @@ async fn home(user: Option) -> Response { } } -async fn people(user: Option) -> Response { +async fn people(user: Option, _: Log) -> Response { if user.is_none() { Redirect::to("/login").into_response() } else { @@ -41,7 +41,7 @@ async fn people(user: Option) -> Response { } } -async fn profile(user: Option) -> Response { +async fn profile(user: Option, _: 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") } -- cgit v1.2.3-freya