making the camp form function goodly
This commit is contained in:
parent
b2d96c13a1
commit
fdb6021683
6 changed files with 5 additions and 10 deletions
|
@ -192,7 +192,7 @@ impl CampForm {
|
|||
}
|
||||
}
|
||||
|
||||
#[post("/camp-form")]
|
||||
#[post("/api/camp-form")]
|
||||
pub async fn camp_form(MultipartForm(form): MultipartForm<CampForm>) -> HttpResponse {
|
||||
let full_name = format!("{} {}", form.first_name.0, form.last_name.0);
|
||||
let map = (&form).into();
|
||||
|
@ -222,7 +222,7 @@ pub async fn camp_form(MultipartForm(form): MultipartForm<CampForm>) -> HttpResp
|
|||
.insert_header((
|
||||
"HX-Redirect",
|
||||
format!(
|
||||
"https://tfcconnection.org/camp-health-form/?registration={}",
|
||||
"/camp-health-form/?registration={}",
|
||||
form.registration.0.as_str()
|
||||
),
|
||||
))
|
||||
|
|
|
@ -70,7 +70,6 @@ impl ContactForm {
|
|||
let mut json = HashMap::new();
|
||||
json.insert("data", map);
|
||||
|
||||
let link = r#"https://staff.tfcconnection.org/apps/tables/#/table/140/row/757"#;
|
||||
let res = client
|
||||
.post("https://staff.tfcconnection.org/ocs/v2.php/apps/tables/api/2/tables/140/rows")
|
||||
.basic_auth("chris", Some("2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b"))
|
||||
|
|
|
@ -380,7 +380,7 @@ pub async fn health_form(MultipartForm(mut form): MultipartForm<HealthForm>) ->
|
|||
.insert_header(("Access-Control-Expose-Headers", "*"))
|
||||
.insert_header((
|
||||
"HX-Redirect",
|
||||
"https://secure.myvanco.com/L-Z772/campaign/C-13DM3",
|
||||
"https://secure.myvanco.com/L-Z772/campaign/C-13JPJ",
|
||||
))
|
||||
.finish()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue