improve email formatting and invite flow for new users

This commit is contained in:
Milo Schwartz 2024-12-31 18:25:11 -05:00
parent d244d6003b
commit d447de9e8a
No known key found for this signature in database
15 changed files with 107 additions and 89 deletions

View file

@ -84,6 +84,15 @@ export async function signup(
createHttpError(HttpCode.BAD_REQUEST, "Invite does not exist")
);
}
if (existingInvite.email !== email) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
"Invite is not for this user"
)
);
}
}
try {