mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-08 19:37:28 -05:00
chore: add early return to NNAS email verification if already verified
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user