bug in health form
This commit is contained in:
parent
9e5acd6aa5
commit
64917db638
|
@ -84,16 +84,16 @@
|
|||
body: data
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
/* if (res.ok) {
|
||||
* if (mtRegistration === 'now')
|
||||
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3';
|
||||
* else if (registration === 'now')
|
||||
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
|
||||
* else if (registration === 'full')
|
||||
* window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
|
||||
* else
|
||||
* window.location.href = '/thankyou/';
|
||||
* } */
|
||||
if (res.ok) {
|
||||
if (mtRegistration === 'now')
|
||||
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3';
|
||||
else if (registration === 'now')
|
||||
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
|
||||
else if (registration === 'full')
|
||||
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
|
||||
else
|
||||
window.location.href = '/thankyou/';
|
||||
}
|
||||
});
|
||||
|
||||
// For use in prod
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
const age = calculate_age(birthdate);
|
||||
data.append("age", age);
|
||||
|
||||
/* let base = "https://api.tfcconnection.org/local-trip-form"; */
|
||||
let base = "http://localhost:4242/mt-form";
|
||||
let base = "https://api.tfcconnection.org/local-trip-form";
|
||||
/* let base = "http://localhost:4242/mt-form"; */
|
||||
|
||||
fetch(base, {
|
||||
method: "POST",
|
||||
|
|
|
@ -62,7 +62,6 @@ struct HealthForm {
|
|||
|
||||
#[post("/health-form")]
|
||||
pub async fn health_form(MultipartForm(form): MultipartForm<HealthForm>) -> HttpResponse {
|
||||
log::info!("{:?}", form);
|
||||
let first = form
|
||||
.first_name
|
||||
.as_ref()
|
||||
|
@ -432,7 +431,6 @@ pub async fn health_form(MultipartForm(form): MultipartForm<HealthForm>) -> Http
|
|||
let mut path: Option<String> = Some(String::from(""));
|
||||
let mut file_exists = false;
|
||||
let mut filename = String::from("");
|
||||
log::info!("{:?}", form);
|
||||
log::info!("{:?}", file_exists);
|
||||
if let Some(f) = form.file {
|
||||
if let Some(file) = f.file_name {
|
||||
|
@ -474,7 +472,7 @@ pub async fn health_form(MultipartForm(form): MultipartForm<HealthForm>) -> Http
|
|||
.unwrap(),
|
||||
)
|
||||
.to("Chris Cochrun <chris@tfcconnection.org>".parse().unwrap())
|
||||
// .to("Ethan Rose <ethan@tfcconnection.org>".parse().unwrap())
|
||||
.to("Ethan Rose <ethan@tfcconnection.org>".parse().unwrap())
|
||||
.subject(email_subject)
|
||||
.multipart(multi)
|
||||
{
|
||||
|
|
|
@ -221,7 +221,7 @@ pub async fn local_form(MultipartForm(form): MultipartForm<LocalForm>) -> HttpRe
|
|||
}
|
||||
}
|
||||
body {
|
||||
h1 { @format!("Mission trip form for {} {}!", first, last) }
|
||||
h1 { @format!("Local mission trip form for {} {}!", first, last) }
|
||||
hr;
|
||||
table {
|
||||
tr {
|
||||
|
|
Loading…
Reference in a new issue