chore: add early return to NNAS email verification if already verified

This commit is contained in:
Jonathan Barrow
2024-11-04 15:11:39 -05:00
parent 5ab424d67d
commit d5dcdcb7de

View File

@@ -71,6 +71,13 @@ router.put('/email_confirmation/:pid/:code', async (request: express.Request, re
return;
}
// * If the email is already confirmed don't bother continuing
if (pnid.email.validated) {
// TODO - Is there an actual error for this case?
response.status(200).send('');
return;
}
if (pnid.identification.email_code !== code) {
response.status(400).send(xmlbuilder.create({
errors: {