Created
April 3, 2018 15:48
-
-
Save oriolrivera/5ce1d935d1b369026d6d827c738cc4e1 to your computer and use it in GitHub Desktop.
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
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