use crate::{authentication::AuthenticatedUser, templates::DashboardTemplate}; use askama::Template; use axum::{ Extension, response::{Html, IntoResponse, Response}, }; use uuid::Uuid; pub async fn admin_dashboard( Extension(AuthenticatedUser { username, .. }): Extension, ) -> Response { let idempotency_key_1 = Uuid::new_v4().to_string(); let idempotency_key_2 = Uuid::new_v4().to_string(); let template = DashboardTemplate { username, idempotency_key_1, idempotency_key_2, }; Html(template.render().unwrap()).into_response() }