fix: check for recipients to send project access email

This commit is contained in:
Scott Wilson
2025-05-28 16:45:43 -07:00
parent bd4cf64fc6
commit 286dc39ed2
@@ -198,6 +198,7 @@ export const orgAdminServiceFactory = ({
) )
.map((el) => el.user.email!); .map((el) => el.user.email!);
if (filteredProjectMembers.length) {
await smtpService.sendMail({ await smtpService.sendMail({
template: SmtpTemplates.OrgAdminProjectDirectAccess, template: SmtpTemplates.OrgAdminProjectDirectAccess,
recipients: filteredProjectMembers, recipients: filteredProjectMembers,
@@ -207,6 +208,7 @@ export const orgAdminServiceFactory = ({
email: projectMembers.find((el) => el.userId === actorId)?.user?.username email: projectMembers.find((el) => el.userId === actorId)?.user?.username
} }
}); });
}
return { isExistingMember: false, membership: updatedMembership }; return { isExistingMember: false, membership: updatedMembership };
}; };