Add callback to mongo.removeSearch, fixes infinite schema update

This commit is contained in:
MrWaffle
2014-01-20 17:21:45 +01:00
parent 5a069f1076
commit e4d8ddcf1b

View File

@@ -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()
}
});
}