You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/server/src/models/organisation.rs
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -745,6 +745,7 @@ impl Organisation {
745
745
inviting_user_id:i64,
746
746
email:String,
747
747
email_credentials:EmailCredentials,
748
+
is_dev_env:bool,
748
749
snowflake_generator:&mutSnowflakeIdGenerator,
749
750
transaction:&mutTransaction<'_,Postgres>,
750
751
) -> Result<String,ChaosError>{
@@ -830,14 +831,18 @@ impl Organisation {
830
831
.execute(transaction.deref_mut())
831
832
.await?;
832
833
833
-
ChaosEmail::send_message(
834
-
None,
835
-
email,
836
-
"You have been invited to join an organisation on Chaos".to_string(),
837
-
format!("You have been invited to join an organisation on Chaos. Please use the following link to accept the invite: https://chaos.devsoc.app/dashboard/invite/{code}").to_string(),
838
-
email_credentials
839
-
)
840
-
.await?;
834
+
if is_dev_env {
835
+
println!("Invite code for {email}: {code}")
836
+
}else{
837
+
ChaosEmail::send_message(
838
+
None,
839
+
email,
840
+
"You have been invited to join an organisation on Chaos".to_string(),
841
+
format!("You have been invited to join an organisation on Chaos. Please use the following link to accept the invite: https://chaos.devsoc.app/dashboard/invite/{code}").to_string(),
0 commit comments