Skip to content

Commit

Permalink
remove sending mail when rejected
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Oct 2, 2024
1 parent e126f9c commit 77f019e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
16 changes: 1 addition & 15 deletions src/controllers/users_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,6 @@ pub async fn reject<'r>(
)));
}

mailer
.create(
&user,
String::from("[Zauth] Your account has been rejected"),
template!(
"mails/user_rejected.txt";
name: String = user.full_name.to_string(),
admin_email: String = conf.admin_email.clone()
)
.render()
.map_err(InternalError::from)?,
)
.await?;

user.delete(&db).await?;

Ok(Accepter {
Expand Down Expand Up @@ -444,7 +430,7 @@ pub fn reset_password_get<'r>(token: String) -> impl Responder<'r, 'static> {

#[derive(Debug, FromForm)]
pub struct PasswordReset {
token: String,
token: String,
new_password: String,
}

Expand Down
7 changes: 0 additions & 7 deletions templates/mails/user_rejected.txt

This file was deleted.

0 comments on commit 77f019e

Please sign in to comment.