adds specificity to verified users

This commit is contained in:
James
2020-10-16 08:48:33 -04:00
parent f0374d5772
commit 5735b4bbec
4 changed files with 4 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ async function login(args) {
const userDoc = await Model.findByUsername(email);
if (!userDoc || (args.collection.config.auth.emailVerification && !userDoc._verified)) {
if (!userDoc || (args.collection.config.auth.emailVerification && userDoc._verified === false)) {
throw new AuthenticationError();
}

View File

@@ -18,7 +18,7 @@ module.exports = ({ operations }, { Model, config }) => {
},
{
_verified: {
equals: true,
not_equals: false,
},
},
];

View File

@@ -28,7 +28,7 @@ module.exports = ({ config, collections, operations }) => {
},
{
_verified: {
equals: true,
not_equals: false,
},
},
];

View File

@@ -27,7 +27,7 @@ const traverseFields = (args) => {
validationPromises,
errors,
payload,
showHiddenFields.
showHiddenFields,
} = args;
fields.forEach((field) => {