diff --git a/src/database/mongo.js b/src/database/mongo.js index b8bd6f0a64..7a1b71c36d 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -145,11 +145,14 @@ }); } - module.searchRemove = function(key, id) { + module.searchRemove = function(key, id, callback) { db.collection('search').remove({id:id, key:key}, function(err, result) { if(err) { winston.error('Error removing search ' + err.message); } + if (typeof callback === 'function') { + callback() + } }); }