create fee reminder mail
This commit is contained in:
@ -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)]
|
||||
|
Reference in New Issue
Block a user