From 28719eb89864bdc757ea9255652eb342847380a6 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Sun, 13 Nov 2022 20:19:41 +0000 Subject: [PATCH] add user helpers --- src/utils/helpers/userHelpers.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/utils/helpers/userHelpers.js 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; +}