add user helpers
This commit is contained in:
parent
8d9e8e282c
commit
28719eb898
10
src/utils/helpers/userHelpers.js
Normal file
10
src/utils/helpers/userHelpers.js
Normal file
@ -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;
|
||||
}
|
Reference in New Issue
Block a user