Administrator privileges to get and delete subscribers
Some checks failed
Rust / Test (push) Has been cancelled
Rust / Rustfmt (push) Has been cancelled
Rust / Clippy (push) Has been cancelled
Rust / Code coverage (push) Has been cancelled

This commit is contained in:
Alphonse Paix
2025-09-30 18:27:48 +02:00
parent b5b00152cd
commit 3e81c27ab3
12 changed files with 2790 additions and 54 deletions

View File

@@ -31,7 +31,7 @@ pub async fn admin_dashboard(
State(AppState {
connection_pool, ..
}): State<AppState>,
Extension(AuthenticatedUser { username, .. }): Extension<AuthenticatedUser>,
Extension(user): Extension<AuthenticatedUser>,
) -> Result<Response, AppError> {
let stats = get_stats(&connection_pool).await?;
let idempotency_key_1 = Uuid::new_v4().to_string();
@@ -46,7 +46,7 @@ pub async fn admin_dashboard(
.context("Could not fetch total subscribers count from the database.")?;
let max_page = get_max_page(count);
let template = DashboardTemplate {
username,
user,
idempotency_key_1,
idempotency_key_2,
stats,