From ef0c9308dcbdb92bf134c77e408dc5517319e7e9 Mon Sep 17 00:00:00 2001 From: Johnathan Lund Date: Mon, 25 Apr 2016 17:50:23 -0600 Subject: [PATCH] update get one mongo query --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0daba47..06cb77d 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ If we have no err then return our result. Just to make sure it's valid json use ``` app.get('/api/products/:id', function(req, res){ var idObj = { - _id: req.params.id + _id: mongo.ObjectId(req.params.id) }; db.products.findOne(idObj, function(err, response){ if(err) {