Skip to content

Commit

Permalink
fix: revalidate invite cache even if email delivery fails (formbricks…
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamPalriwala authored Dec 22, 2023
1 parent ab22c02 commit 6ac48a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/lib/invite/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,11 @@ export const inviteUser = async ({
},
});

await sendInviteMemberEmail(invite.id, email, currentUserName, name);

inviteCache.revalidate({
id: invite.id,
teamId: invite.teamId,
});

await sendInviteMemberEmail(invite.id, email, currentUserName, name);
return invite;
};

0 comments on commit 6ac48a2

Please sign in to comment.