Working on airport drawer
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user