From 3e983e05f91a30555aafc1dde29970462a110b45 Mon Sep 17 00:00:00 2001 From: philipp Date: Fri, 21 Jun 2024 11:24:14 +0200 Subject: [PATCH] allow vorstand to send mail + notifications --- src/tera/admin/mail.rs | 4 ++-- src/tera/admin/notification.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tera/admin/mail.rs b/src/tera/admin/mail.rs index 3432237..df1bf0a 100644 --- a/src/tera/admin/mail.rs +++ b/src/tera/admin/mail.rs @@ -9,8 +9,8 @@ use sqlx::SqlitePool; use crate::model::log::Log; use crate::model::mail::Mail; use crate::model::role::Role; -use crate::model::user::AdminUser; use crate::model::user::UserWithDetails; +use crate::model::user::{AdminUser, VorstandUser}; use crate::tera::Config; #[get("/mail")] @@ -27,7 +27,7 @@ async fn index( context.insert( "loggedin_user", - &UserWithDetails::from_user(admin.user, db).await, + &UserWithDetails::from_user(admin.0, db).await, ); context.insert("roles", &roles); diff --git a/src/tera/admin/notification.rs b/src/tera/admin/notification.rs index 58d5294..065f426 100644 --- a/src/tera/admin/notification.rs +++ b/src/tera/admin/notification.rs @@ -2,7 +2,7 @@ use crate::model::{ log::Log, notification::Notification, role::Role, - user::{AdminUser, User, UserWithDetails, VorstandUser}, + user::{User, UserWithDetails, VorstandUser}, }; use itertools::Itertools; use rocket::{ @@ -27,7 +27,7 @@ async fn index( } context.insert( "loggedin_user", - &UserWithDetails::from_user(user.user, db).await, + &UserWithDetails::from_user(user.0, db).await, ); let users: Vec = User::all(db) -- 2.45.2