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

Function getOneInviteByUser

apps/web/services/invites.ts:133–152  ·  view source on GitHub ↗
(
  email: string
)

Source from the content-addressed store, hash-verified

131>;
132
133export async function getOneInviteByUser(
134 email: string
135): Promise<GetOneInviteByUserType | null> {
136 return await prisma.invites.findFirst({
137 select: {
138 accounts: {
139 select: { name: true, discordDomain: true, slackDomain: true },
140 },
141 status: true,
142 id: true,
143 createdBy: {
144 select: { displayName: true, auth: { select: { email: true } } },
145 },
146 },
147 where: {
148 email,
149 status: 'PENDING',
150 },
151 });
152}
153
154export async function acceptInvite(id: string, email: string) {
155 const invite = await prisma.invites.findUnique({ where: { id } });

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected