make scheckbuch user behave as previously, but in own file
This commit is contained in:
@ -30,16 +30,23 @@ impl ScheckbuchUser {
|
||||
user.add_role(db, &scheckbuch).await.unwrap();
|
||||
|
||||
// TODO: remove all other `membership_type` roles
|
||||
let new_user = Self::new(db, &user).await.unwrap();
|
||||
|
||||
let new_user = Self::new(db, user).await.unwrap();
|
||||
new_user.notify(db, mail, smtp_pw).await
|
||||
}
|
||||
|
||||
new_user
|
||||
.send_welcome_mail_to_user(db, mail, smtp_pw)
|
||||
.await?;
|
||||
new_user.notify_coxes_about_new_scheckbuch(db).await;
|
||||
pub(crate) async fn notify(
|
||||
&self,
|
||||
db: &SqlitePool,
|
||||
mail: &str,
|
||||
smtp_pw: &str,
|
||||
) -> Result<(), String> {
|
||||
self.send_welcome_mail_to_user(db, mail, smtp_pw).await?;
|
||||
self.notify_coxes_about_new_scheckbuch(db).await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn send_welcome_mail_to_user(
|
||||
&self,
|
||||
db: &SqlitePool,
|
||||
|
Reference in New Issue
Block a user