diff --git a/src/database/mongo/sets.js b/src/database/mongo/sets.js index 210c3ad2fe..208e380a12 100644 --- a/src/database/mongo/sets.js +++ b/src/database/mongo/sets.js @@ -24,7 +24,7 @@ module.exports = function(db, module) { }, { upsert: true, w: 1 - }, function(err) { + }, function(err, res) { callback(err); }); }; @@ -54,7 +54,7 @@ module.exports = function(db, module) { }}); } - bulk.execute(function(err) { + bulk.execute(function(err, res) { callback(err); }); }; @@ -69,7 +69,9 @@ module.exports = function(db, module) { array[index] = helpers.valueToString(element); }); - db.collection('objects').update({_key: key}, {$pullAll: {members: value}}, callback); + db.collection('objects').update({_key: key}, {$pullAll: {members: value}}, function(err, res) { + callback(err); + }); }; module.setsRemove = function(keys, value, callback) { diff --git a/src/database/redis/sets.js b/src/database/redis/sets.js index 9148dd34f8..53ac5b0d07 100644 --- a/src/database/redis/sets.js +++ b/src/database/redis/sets.js @@ -3,7 +3,7 @@ module.exports = function(redisClient, module) { module.setAdd = function(key, value, callback) { callback = callback || function() {}; - redisClient.sadd(key, value, function(err) { + redisClient.sadd(key, value, function(err, res) { callback(err); }); }; @@ -14,13 +14,15 @@ module.exports = function(redisClient, module) { for (var i=0; i