Administrator privileges to get and delete subscribers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user