We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d4be3c commit c834e46Copy full SHA for c834e46
lib/users/common.js
@@ -15,7 +15,7 @@ const USER_COLLECTION_NAME = exports.USER_COLLECTION_NAME = 'user';
15
exports.JWT_SECRET_KEY = process.env.JWT_SECRET_KEY || 'efwpoeiurpoijk123`3asd;lkj32E@#;l3kj3#Eeplk3j34fpoiu-Oiu;lkj';
16
17
exports.validateEmailUniqueness = async (req, email, errors) => {
18
- if (email && errors.email === undefined && (await req.wrestler.dbDriver.countBy(req.wrestler.resource, { email })) !== 0) {
+ if (email && errors.email === undefined && +(await req.wrestler.dbDriver.countBy(req.wrestler.resource, { email })) !== 0) {
19
errors.email = { messages: ['Email already exists'] };
20
}
21
};
0 commit comments