making tests work with emails
This commit is contained in:
parent
33b8c0d7c3
commit
b2d96c13a1
3 changed files with 267 additions and 322 deletions
|
@ -153,7 +153,7 @@ impl MtParentForm {
|
|||
}
|
||||
}
|
||||
|
||||
async fn send_email(&mut self) -> Result<()> {
|
||||
async fn send_email(&self) -> Result<()> {
|
||||
let first = self.student_first_name.clone();
|
||||
let last = self.student_last_name.clone();
|
||||
let email_subject = format!("Parent reference form for {} {}!", first, last);
|
||||
|
@ -180,7 +180,7 @@ impl MtParentForm {
|
|||
}
|
||||
|
||||
#[post("/api/mt-parent-form")]
|
||||
pub async fn mt_parent_form(MultipartForm(mut form): MultipartForm<MtParentForm>) -> HttpResponse {
|
||||
pub async fn mt_parent_form(MultipartForm(form): MultipartForm<MtParentForm>) -> HttpResponse {
|
||||
match form.store_form().await {
|
||||
Ok(_) => info!("Successfully sent form to nextcloud!"),
|
||||
Err(e) => error!("There was an erroring sending form to nextcloud: {e}"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue