idk....
This commit is contained in:
		
							parent
							
								
									308c4fb9c5
								
							
						
					
					
						commit
						878a8bb8d1
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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(())
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue