From 7440ebb4bb63db3f4c5fbf54251cdb6784806057 Mon Sep 17 00:00:00 2001 From: RMcTn Date: Mon, 16 Oct 2023 18:00:00 +0100 Subject: [PATCH] Remove dbg statements, and add users page link to root --- server/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index 6d4fd78..3c17093 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -3,6 +3,7 @@ // every day or something? // TODO: Please stick a "retry" button in for the annoying failures. Until we move to some // job system anyway +// TODO: Generic sign in redirect even for 404's? (If not signed in) #![allow(clippy::needless_return)] use std::error::Error; @@ -222,9 +223,7 @@ async fn submit_user_form( Form(input): Form, ) -> impl IntoResponse { let pool = app_state.pool; - dbg!(&input); let user = create_user(&pool, input).await.unwrap(); - dbg!(&user); let redirect = Redirect::to(USERS_ROUTE).into_response(); return redirect.into_response(); } @@ -299,10 +298,10 @@ async fn auth_middleware( #[debug_handler] async fn root_page(TypedHeader(cookie): TypedHeader) -> impl IntoResponse { if let Some(session_id) = cookie.get("session_id") { - dbg!(session_id); // TODO: Please stick a "retry" button in for the annoying failures. Until we move to some // job system anyway - return Html("Nothing yet".to_string()).into_response(); + let users_page_link = format!("Users", USERS_ROUTE); + return Html(users_page_link).into_response(); } else { let redirect = Redirect::to("/signin").into_response(); return redirect.into_response();