trying to log what's going on
This commit is contained in:
parent
676038961d
commit
cb6d20a23b
|
@ -340,7 +340,7 @@ impl HealthForm {
|
||||||
.subject(email_subject)
|
.subject(email_subject)
|
||||||
.multipart(multi)
|
.multipart(multi)
|
||||||
{
|
{
|
||||||
crate::email::send_email(m).await
|
send_email(m).await
|
||||||
} else {
|
} else {
|
||||||
Err(eyre!("Email incorrect"))
|
Err(eyre!("Email incorrect"))
|
||||||
}
|
}
|
||||||
|
@ -349,6 +349,7 @@ impl HealthForm {
|
||||||
|
|
||||||
#[post("/api/health-form")]
|
#[post("/api/health-form")]
|
||||||
pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) -> HttpResponse {
|
pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) -> HttpResponse {
|
||||||
|
info!("Starting health form work: {:?}", form);
|
||||||
match form.send_email().await {
|
match form.send_email().await {
|
||||||
Ok(_) => info!("Successfully sent email health form"),
|
Ok(_) => info!("Successfully sent email health form"),
|
||||||
Err(e) => error!("There was an error sending email: {e}"),
|
Err(e) => error!("There was an error sending email: {e}"),
|
||||||
|
@ -393,7 +394,7 @@ pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) ->
|
||||||
HttpResponse::Ok().body(html.into_string())
|
HttpResponse::Ok().body(html.into_string())
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
log::error!(
|
log::warn!(
|
||||||
"Got registration error possibly. Here is what the registration was: {}",
|
"Got registration error possibly. Here is what the registration was: {}",
|
||||||
form.registration.0.as_str()
|
form.registration.0.as_str()
|
||||||
);
|
);
|
||||||
|
@ -402,10 +403,9 @@ pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) ->
|
||||||
h2 {
|
h2 {
|
||||||
"Thank you, " (full_name) "!"
|
"Thank you, " (full_name) "!"
|
||||||
}
|
}
|
||||||
p { "Can't wait to see you at camp!" }
|
|
||||||
p {
|
p {
|
||||||
class { "" }
|
class { "" }
|
||||||
"If you'd like to pay for your registration go to the donate tab in the top right when you are ready and find the camp registration option."
|
"If you filled this out for camp or mission trip you can pay for your registration at the donate tab in the top right when you are ready and find the camp or mission trip registration option."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue