diff --git a/src/api/health_form.rs b/src/api/health_form.rs index 5731c32..d4e0022 100644 --- a/src/api/health_form.rs +++ b/src/api/health_form.rs @@ -19,11 +19,10 @@ struct HealthForm { #[multipart(rename = "parentlastname")] parent_last_name: Option>, birthdate: Option>, - gender: Option>, street: Option>, city: Option>, state: Option>, - zip: Option>, + zip: Option>, #[multipart(rename = "cellphone")] parent_cellphone: Option>, homephone: Option>, @@ -63,6 +62,7 @@ struct HealthForm { #[post("/health-form")] pub async fn health_form(MultipartForm(form): MultipartForm) -> HttpResponse { + log::info!("{:?}", form); let first = form .first_name .as_ref() @@ -106,14 +106,6 @@ pub async fn health_form(MultipartForm(form): MultipartForm) -> Http }) .0 .clone(); - let gender = form - .gender - .as_ref() - .unwrap_or(&Text { - 0: String::from(""), - }) - .0 - .clone(); let street = form .street .as_ref() @@ -138,7 +130,14 @@ pub async fn health_form(MultipartForm(form): MultipartForm) -> Http }) .0 .clone(); - let zip = form.zip.as_ref().unwrap_or(&Text { 0: 0 }).0.clone(); + let zip = form + .zip + .as_ref() + .unwrap_or(&Text { + 0: String::from(""), + }) + .0 + .clone(); let parent_cellphone = form .parent_cellphone .as_ref() @@ -330,10 +329,6 @@ pub async fn health_form(MultipartForm(form): MultipartForm) -> Http th { "Birthdate" } td { @birthdate } } - tr { - th { "Gender" } - td { @gender } - } tr { th { "Street" } td { @street } @@ -479,7 +474,7 @@ pub async fn health_form(MultipartForm(form): MultipartForm) -> Http .unwrap(), ) .to("Chris Cochrun ".parse().unwrap()) - .to("Ethan Rose ".parse().unwrap()) + // .to("Ethan Rose ".parse().unwrap()) .subject(email_subject) .multipart(multi) {