add user helpers

This commit is contained in:
Liam 2022-11-13 20:19:41 +00:00
parent 8d9e8e282c
commit 28719eb898

@ -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;
}