From cb6d20a23b30fedb3fad2bfda8d008e7b566c02e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 19 Dec 2024 11:44:45 -0600 Subject: [PATCH] trying to log what's going on --- src/api/health_form.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/health_form.rs b/src/api/health_form.rs index 51cc49e..94bdf7c 100644 --- a/src/api/health_form.rs +++ b/src/api/health_form.rs @@ -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) -> 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) -> 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) -> 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." } } };