create fee reminder mail
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m10s
CI/CD Pipeline / deploy-staging (push) Successful in 4m7s
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-01-19 11:19:24 +01:00
parent 578e3df9e9
commit 0ed740ec47
2 changed files with 106 additions and 2 deletions

View File

@ -33,6 +33,17 @@ async fn index(
Template::render("admin/mail", context.into_json())
}
#[get("/mail/fee")]
async fn fee(
db: &State<SqlitePool>,
admin: AdminUser,
config: &State<Config>,
flash: Option<FlashMessage<'_>>,
) -> &'static str {
Mail::fees(db, config.smtp_pw.clone()).await;
"SUCC"
}
#[derive(FromForm, Debug)]
pub struct MailToSend<'a> {
pub(crate) role_id: i32,
@ -57,7 +68,7 @@ async fn update(
}
pub fn routes() -> Vec<Route> {
routes![index, update]
routes![index, update, fee]
}
#[cfg(test)]