MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / inviteNewMembers

Function inviteNewMembers

apps/web/services/invites.ts:357–377  ·  view source on GitHub ↗
({
  emails = [],
  ownerUser,
  accountId,
}: {
  emails: string[];
  ownerUser: users;
  accountId: string;
})

Source from the content-addressed store, hash-verified

355}
356
357export 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}

Callers 1

accounts.tsFile · 0.90

Calls 2

getHostFromHeadersFunction · 0.90
createInvitationFunction · 0.85

Tested by

no test coverage detected