Removed user not found error

This commit is contained in:
Kevin Antonio Rateni Iatauro 2022-03-10 17:51:47 +01:00 committed by GitHub
parent 39db68bcbf
commit ba73a398dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,7 +338,7 @@ module.exports = {
params.confirmed = true;
}
const user = await getService('user').add(params);
const user = await getService('user').add(params);
const sanitizedUser = await sanitizeUser(user, ctx);
@ -420,7 +420,10 @@ module.exports = {
});
if (!user) {
throw new ApplicationError('user.not.found');
return ctx.send({
email: params.email,
sent: true
});
}
if (user.confirmed) {