Skip to content

Instantly share code, notes, and snippets.

@georgeben
Last active September 8, 2022 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgeben/f4b67421eb533f4b12c6cdf2f2a7b855 to your computer and use it in GitHub Desktop.
Save georgeben/f4b67421eb533f4b12c6cdf2f2a7b855 to your computer and use it in GitHub Desktop.
unvalidated input
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