small fixes to invite user workflow

This commit is contained in:
Milo Schwartz 2024-11-14 00:13:37 -05:00
parent ba3505a385
commit 8e64b5e0e9
No known key found for this signature in database
4 changed files with 6 additions and 5 deletions

View file

@ -89,7 +89,7 @@ export async function acceptInvite(
);
}
if (existingUser[0].email !== existingInvite[0].email) {
if (req.user && req.user.email !== existingInvite[0].email) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,