This commit is contained in:
Chris Cochrun 2024-07-01 10:10:19 -05:00
parent 308c4fb9c5
commit 878a8bb8d1

View file

@ -1,10 +1,11 @@
use actix_multipart::form::{text::Text, MultipartForm};
use actix_multipart::form::{json, text::Text, MultipartForm};
use actix_web::{post, HttpResponse};
use lettre::{
message::MultiPart,
transport::smtp::authentication::{Credentials, Mechanism},
Message, SmtpTransport, Transport,
};
use reqwest::Request;
use super::errors::ApiError;
@ -314,5 +315,13 @@ pub async fn camp_form(MultipartForm(form): MultipartForm<CampForm>) -> HttpResp
}
async fn store_camp_form(form: CampForm) -> Result<(), ApiError> {
let request = reqwest::Client::new();
let json = json::Json::from(form);
let res = request
.post("https://tbl.tfcconnection.org/")
.header("xc-token", "Ohah24HNGXVvvixv8tvVJW5uNNdWjDJHG1d4t3o9")
.body(json)
.send()
.await?;
Ok(())
}