Skip to content

Commit

Permalink
fix: change variable names for email results
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsMani committed Nov 22, 2024
1 parent b3aa83b commit 9fcd2ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/router/src/core/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,34 +255,34 @@ pub async fn connect_account(
auth_id,
};

let send_email_result = state
let magic_link_result = state
.email_client
.compose_and_send_email(
Box::new(magic_link_email),
state.conf.proxy.https_url.as_ref(),
)
.await;

logger::info!(?send_email_result);
logger::info!(?magic_link_result);

let welcome_to_community_email = email_types::WelcomeToCommunity {
recipient_email: domain::UserEmail::from_pii_email(user_from_db.get_email())?,
subject: consts::user::EMAIL_SUBJECT_WELCOME_TO_COMMUNITY,
};

let send_email_result = state
let welcome_email_result = state
.email_client
.compose_and_send_email(
Box::new(welcome_to_community_email),
state.conf.proxy.https_url.as_ref(),
)
.await;

logger::info!(?send_email_result);
logger::info!(?welcome_email_result);

return Ok(ApplicationResponse::Json(
user_api::ConnectAccountResponse {
is_email_sent: send_email_result.is_ok(),
is_email_sent: magic_link_result.is_ok(),
user_id: user_from_db.get_user_id().to_string(),
},
));
Expand Down

0 comments on commit 9fcd2ac

Please sign in to comment.