diff --git a/src/utils/helpers/userHelpers.js b/src/utils/helpers/userHelpers.js new file mode 100644 index 0000000..34aab85 --- /dev/null +++ b/src/utils/helpers/userHelpers.js @@ -0,0 +1,10 @@ +/** + * Returns the user with the given email address + * + * @param {string} email The users email address + * @return The users object in mongo or null if not found + */ +export async function getUser(email) { + const user = await UserModel.find({ email: email }); + return user; +}