|
|
|
@ -16,7 +16,7 @@ module.exports = function(Groups) {
|
|
|
|
|
var tasks = [
|
|
|
|
|
async.apply(db.sortedSetAdd, 'group:' + groupName + ':members', Date.now(), uid),
|
|
|
|
|
async.apply(db.incrObjectField, 'group:' + groupName, 'memberCount'),
|
|
|
|
|
async.apply(db.sortedSetIncrBy, 'group:visible:memberCount', 1, groupName)
|
|
|
|
|
async.apply(db.sortedSetIncrBy, 'groups:visible:memberCount', 1, groupName)
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
async.waterfall([
|
|
|
|
@ -181,7 +181,7 @@ module.exports = function(Groups) {
|
|
|
|
|
|
|
|
|
|
var tasks = [
|
|
|
|
|
async.apply(db.sortedSetRemove, 'group:' + groupName + ':members', uid),
|
|
|
|
|
async.apply(db.sortedSetIncrBy, 'group:visible:memberCount', -1, groupName),
|
|
|
|
|
async.apply(db.sortedSetIncrBy, 'groups:visible:memberCount', -1, groupName),
|
|
|
|
|
async.apply(db.setRemove, 'group:' + groupName + ':owners', uid),
|
|
|
|
|
async.apply(db.decrObjectField, 'group:' + groupName, 'memberCount')
|
|
|
|
|
];
|
|
|
|
|