Working on airport drawer

This commit is contained in:
2025-05-28 21:21:25 -04:00
parent 25608db372
commit 7dedc7a8dc
5 changed files with 79 additions and 10 deletions

View File

@@ -45,11 +45,13 @@ async fn register(user: web::Json<RegisterRequest>, req: HttpRequest) -> HttpRes
// Send confirmation email
if let Some(email) = email {
tokio::spawn(async move {
if let Err(err) = send_confirm_email(&email, &ip_address).await {
log::error!("Failed to send confirmation email: {}", err);
};
});
if !email.is_empty() {
tokio::spawn(async move {
if let Err(err) = send_confirm_email(&email, &ip_address).await {
log::error!("Failed to send confirmation email: {}", err);
};
});
}
}
HttpResponse::Created().json(user_response)