Handle user not found error in email confirmation

This commit is contained in:
WalkingPizza 2022-01-28 22:03:23 +01:00
parent 0dd74c685b
commit a49141679c

View File

@ -422,6 +422,10 @@ module.exports = {
where: { email: params.email },
});
if (!user) {
throw new ApplicationError('user.not.found');
}
if (user.confirmed) {
throw new ApplicationError('already.confirmed');
}