Last active
September 8, 2022 22:35
-
-
Save georgeben/f4b67421eb533f4b12c6cdf2f2a7b855 to your computer and use it in GitHub Desktop.
unvalidated input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkIfEmailExist(request, response) { | |
const email = request.body.email; | |
/** | |
** We want to get users with the email specified in the request. | |
*/ | |
const user = await UserModel.find({ email: email }) | |
return response.json(user) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment