use axum::response::{IntoResponse, Redirect}; use crate::{templates::Index, AuthContext}; pub async fn handle_slash_redir() -> impl IntoResponse { Redirect::temporary("/") } pub async fn handle_slash(auth: AuthContext) -> impl IntoResponse { if let Some(ref user) = auth.current_user { let name = &user.username; tracing::debug!("Logged in as: {name}"); } else { tracing::debug!("Not logged in."); } Index { user: auth.current_user, } }