Skip to content

Commit

Permalink
fix: resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvdixit88 committed Nov 6, 2024
1 parent 540d61a commit e83ce3f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/router/src/core/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,10 @@ async fn handle_existing_user_invitation(
created_at: now,
last_modified: now,
entity: domain::NoLevel,
// TODO: To be sent from token after option is removed
tenant_id: state.tenant.tenant_id.clone(),
tenant_id: user_from_token
.tenant_id
.clone()
.unwrap_or(state.tenant.tenant_id.clone()),
};

let _user_role = match role_info.get_entity_type() {
Expand Down Expand Up @@ -773,8 +775,10 @@ async fn handle_new_user_invitation(
created_at: now,
last_modified: now,
entity: domain::NoLevel,
// TODO: To be sent from token after option is removed
tenant_id: state.tenant.tenant_id.clone(),
tenant_id: user_from_token
.tenant_id
.clone()
.unwrap_or(state.tenant.tenant_id.clone()),
};

let _user_role = match role_info.get_entity_type() {
Expand Down

0 comments on commit e83ce3f

Please sign in to comment.