From b1659b5085c5eadef409bd7282e3c68ebbd03850 Mon Sep 17 00:00:00 2001 From: andreagerino Date: Fri, 27 Nov 2015 21:07:29 +0100 Subject: [PATCH] ... --- routes/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/storage.js b/routes/storage.js index d5dd310..897aff0 100644 --- a/routes/storage.js +++ b/routes/storage.js @@ -3,7 +3,7 @@ var router = express.Router(); var debug = require('debug')('Icarus:server'); var mongoClient = require('mongodb').MongoClient; -var objectID = mongoClient.objectId; +var ObjectID = require('mongodb').ObjectID; var assert = assert = require('assert'); @@ -33,7 +33,7 @@ router.get('/:resource_id', function(req, res, next) { var collection = db.collection('resources'); - var _id = new objectID(req.params.resource_id); + var _id = new ObjectID(req.params.resource_id); collection.find({"_id":_id}).limit(1).next(function(err, doc){ if(err!=null){ -- 2.18.1