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

Function createChannelMemberships

apps/web/services/invites.ts:246–260  ·  view source on GitHub ↗
(accountId: string, userId: string)

Source from the content-addressed store, hash-verified

244}
245
246async function createChannelMemberships(accountId: string, userId: string) {
247 const channels = await prisma.channels.findMany({
248 where: {
249 accountId: accountId,
250 default: true,
251 },
252 });
253 await prisma.memberships.createMany({
254 skipDuplicates: true,
255 data: channels.map((c) => ({
256 channelsId: c.id,
257 usersId: userId,
258 })),
259 });
260}
261
262export async function joinCommunity(
263 email: string,

Callers 2

joinCommunityFunction · 0.85
joinCommunityAfterSignInFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected