forked from Ruderverein-Donau-Linz/rowt
allow moving scheckbuch -> unterstützend + fördernd
This commit is contained in:
@ -6,17 +6,10 @@ use crate::{
|
||||
use rocket::async_trait;
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
special_user!(RegularUser, +"Donau Linz", -"Unterstützend", -"Förderndes Mitglied");
|
||||
special_user!(RegularUser, +"Donau Linz");
|
||||
|
||||
impl RegularUser {
|
||||
pub(crate) async fn notify(&self, db: &SqlitePool, smtp_pw: &str) -> Result<(), String> {
|
||||
self.notify_coxes_about_new_regular(db).await;
|
||||
self.send_welcome_mail_to_user(db, smtp_pw).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn send_welcome_mail_to_user(
|
||||
pub(crate) async fn send_welcome_mail_to_user(
|
||||
&self,
|
||||
db: &SqlitePool,
|
||||
smtp_pw: &str,
|
||||
@ -56,18 +49,5 @@ ASKÖ Ruderverein Donau Linz", self.name),
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn notify_coxes_about_new_regular(&self, db: &SqlitePool) {
|
||||
Notification::create_for_steering_people(
|
||||
db,
|
||||
&format!(
|
||||
"Liebe Steuerberechtigte, seit {} gibt es ein neues Mitglied: {}",
|
||||
self.member_since_date.clone().unwrap(),
|
||||
self.name
|
||||
),
|
||||
"Neues Vereinsmitglied",
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
async fn notify_coxes_about_new_regular(&self, db: &SqlitePool) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user