( email: string )
| 131 | >; |
| 132 | |
| 133 | export 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 | |
| 154 | export async function acceptInvite(id: string, email: string) { |
| 155 | const invite = await prisma.invites.findUnique({ where: { id } }); |
nothing calls this directly
no outgoing calls
no test coverage detected