diff --git a/routes/storage.js b/routes/storage.js index d5dd31078e3e71b1d1309a4000961150ffedf078..897aff0a71ecdf867ba15f0d340d4c268b485a94 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){