make scheckbuch user behave as previously, but in own file
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2025-04-29 21:00:50 +02:00
parent 876451fc02
commit 7604678d4a
8 changed files with 42 additions and 32 deletions

View File

@ -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,