fix: revalidate invite cache even if email delivery fails (#1823)

This commit is contained in:
Shubham Palriwala
2023-12-22 18:00:40 +05:30
committed by GitHub
parent ab22c0297e
commit 6ac48a26bb

View File

@@ -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;
};