User profile and admin privileges

This commit is contained in:
Alphonse Paix
2025-10-01 01:17:59 +02:00
parent 3e81c27ab3
commit 402c560354
22 changed files with 467 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
use crate::{
authentication::AuthenticatedUser,
domain::{PostEntry, SubscriberEntry},
domain::{PostEntry, SubscriberEntry, UserEntry},
routes::{AppError, DashboardStats},
};
use askama::Template;
@@ -21,6 +21,13 @@ where
}
}
#[derive(Template)]
#[template(path = "user/profile.html")]
pub struct UserTemplate {
pub user: UserEntry,
pub posts: Vec<PostEntry>,
}
#[derive(Template)]
#[template(path = "message.html")]
pub struct MessageTemplate {