({
emails = [],
ownerUser,
accountId,
}: {
emails: string[];
ownerUser: users;
accountId: string;
})
| 355 | } |
| 356 | |
| 357 | export async function inviteNewMembers({ |
| 358 | emails = [], |
| 359 | ownerUser, |
| 360 | accountId, |
| 361 | }: { |
| 362 | emails: string[]; |
| 363 | ownerUser: users; |
| 364 | accountId: string; |
| 365 | }) { |
| 366 | if (emails.length) { |
| 367 | for (const email of unique(emails)) { |
| 368 | await createInvitation({ |
| 369 | createdByUserId: ownerUser.id, |
| 370 | email, |
| 371 | accountId, |
| 372 | host: getHostFromHeaders(), |
| 373 | role: Roles.MEMBER, |
| 374 | }); |
| 375 | } |
| 376 | } |
| 377 | } |
no test coverage detected