dont do anything if id is falsy

added callback
v1.18.x
barisusakli 10 years ago
parent 203e69aa42
commit ec8fc8b97b

@ -41,6 +41,9 @@ module.exports = function(db, module) {
module.searchRemove = function(key, id, callback) {
callback = callback || helpers.noop;
if (!id) {
return callback();
}
db.collection('search').remove({key: key, id: id}, callback);
};

@ -26,6 +26,11 @@ module.exports = function(redisClient, module) {
};
module.searchRemove = function(key, id, callback) {
callback = callback || function() {};
if (!id) {
return callback();
}
if (key === 'post') {
module.postSearch.remove(id, callback);
} else if(key === 'topic') {

Loading…
Cancel
Save