trying to log what's going on

This commit is contained in:
Chris Cochrun 2024-12-19 11:44:45 -06:00
parent 676038961d
commit cb6d20a23b

View file

@ -340,7 +340,7 @@ impl HealthForm {
.subject(email_subject)
.multipart(multi)
{
crate::email::send_email(m).await
send_email(m).await
} else {
Err(eyre!("Email incorrect"))
}
@ -349,6 +349,7 @@ impl HealthForm {
#[post("/api/health-form")]
pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) -> HttpResponse {
info!("Starting health form work: {:?}", form);
match form.send_email().await {
Ok(_) => info!("Successfully sent email health form"),
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())
}
_ => {
log::error!(
log::warn!(
"Got registration error possibly. Here is what the registration was: {}",
form.registration.0.as_str()
);
@ -402,10 +403,9 @@ pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) ->
h2 {
"Thank you, " (full_name) "!"
}
p { "Can't wait to see you at camp!" }
p {
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."
}
}
};