Templates refactoring
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::authentication::AuthenticatedUser;
|
||||
use crate::{authentication::AuthenticatedUser, templates::DashboardTemplate};
|
||||
use askama::Template;
|
||||
use axum::{
|
||||
Extension,
|
||||
@@ -6,14 +6,6 @@ use axum::{
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/dashboard.html")]
|
||||
struct DashboardTemplate {
|
||||
username: String,
|
||||
idempotency_key_1: String,
|
||||
idempotency_key_2: String,
|
||||
}
|
||||
|
||||
pub async fn admin_dashboard(
|
||||
Extension(AuthenticatedUser { username, .. }): Extension<AuthenticatedUser>,
|
||||
) -> Response {
|
||||
|
||||
Reference in New Issue
Block a user