Skip to content

Instantly share code, notes, and snippets.

@oriolrivera
Created April 3, 2018 15:48
Show Gist options
  • Save oriolrivera/5ce1d935d1b369026d6d827c738cc4e1 to your computer and use it in GitHub Desktop.
Save oriolrivera/5ce1d935d1b369026d6d827c738cc4e1 to your computer and use it in GitHub Desktop.
var query = { name: "prueba(2)" };
List.find(query, (err, lists) => {
if (err) return res.status(500).send({ message: `Error al realizar la petición: ${err}`})
if (!lists) return res.status(404).send({message: 'No existen registros'})
res.status(200).send({message: '', lists})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment