Function
getUsersInvites
({ email }: { email: string })
Source from the content-addressed store, hash-verified
| 127 | } |
| 128 | |
| 129 | export async function getUsersInvites({ email }: { email: string }) { |
| 130 | return await prisma.orgMemberInvite.findMany({ |
| 131 | where: { |
| 132 | email, |
| 133 | organization: { |
| 134 | deletedAt: null, |
| 135 | }, |
| 136 | }, |
| 137 | include: { |
| 138 | organization: true, |
| 139 | inviter: true, |
| 140 | }, |
| 141 | }); |
| 142 | } |
| 143 | |
| 144 | export async function acceptInvite({ userId, inviteId }: { userId: string; inviteId: string }) { |
| 145 | return await prisma.$transaction(async (tx) => { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…