There was an error while loading. Please reload this page.
1 parent 2e22544 commit aa34fe7Copy full SHA for aa34fe7
1 file changed
src/invites/mutations/acceptInvite.ts
@@ -226,12 +226,9 @@ export default resolver.pipe(
226
ctx
227
)
228
229
- // Delete invitation(s) for that email and project Id
230
- await db.invitation.deleteMany({
231
- where: {
232
- email: invite.email,
233
- projectId: invite.projectId,
234
- },
+ // Delete this specific invitation by id so it can only be used once
+ await db.invitation.delete({
+ where: { id: invite.id },
235
})
236
237
return project
0 commit comments