diff --git a/src/tera/admin/mail.rs b/src/tera/admin/mail.rs index 9abbad8..3432237 100644 --- a/src/tera/admin/mail.rs +++ b/src/tera/admin/mail.rs @@ -16,7 +16,7 @@ use crate::tera::Config; #[get("/mail")] async fn index( db: &State, - admin: AdminUser, + admin: VorstandUser, flash: Option>, ) -> Template { let mut context = Context::new(); @@ -65,7 +65,7 @@ async fn update( db: &State, data: Form>, config: &State, - admin: AdminUser, + admin: VorstandUser, ) -> Flash { let d = data.into_inner(); Log::create(db, format!("{admin:?} trying to send this mail: {d:?}")).await; diff --git a/src/tera/admin/notification.rs b/src/tera/admin/notification.rs index 8d77ff2..58d5294 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}, + user::{AdminUser, User, UserWithDetails, VorstandUser}, }; use itertools::Itertools; use rocket::{ @@ -18,7 +18,7 @@ use sqlx::SqlitePool; #[get("/notification")] async fn index( db: &State, - user: AdminUser, + user: VorstandUser, flash: Option>, ) -> Template { let mut context = Context::new(); @@ -62,7 +62,7 @@ pub struct NotificationToSendUser { async fn send_group( db: &State, data: Form, - admin: AdminUser, + admin: VorstandUser, ) -> Flash { let d = data.into_inner(); Log::create( @@ -89,7 +89,7 @@ async fn send_group( async fn send_user( db: &State, data: Form, - admin: AdminUser, + admin: VorstandUser, ) -> Flash { let d = data.into_inner(); Log::create( diff --git a/templates/index.html.tera b/templates/index.html.tera index dde87ba..cca630f 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -155,6 +155,13 @@ Bootshaus +
  • + Mail ausschicken +
  • +
  • + Nachricht ausschreiben +
  • {% endif %} @@ -169,19 +176,12 @@
  • User
  • -
  • - Mail -
  • Logs
  • Fingerabdruck-Liste überprüfen
  • -
  • - Nachricht ausschreiben -
  • {% endif %}