|
|
|
@ -75,7 +75,6 @@ module.exports = function(Groups) {
|
|
|
|
|
async.apply(db.sortedSetRemove, 'groups:visible:createtime', groupName),
|
|
|
|
|
async.apply(db.sortedSetRemove, 'groups:visible:memberCount', groupName),
|
|
|
|
|
async.apply(db.sortedSetRemove, 'groups:visible:name', groupName.toLowerCase() + ':' + groupName),
|
|
|
|
|
async.apply(db.deleteObjectField, 'groupslug:groupname', utils.slugify(groupName))
|
|
|
|
|
], callback);
|
|
|
|
|
} else {
|
|
|
|
|
db.getObjectFields('group:' + groupName, ['createtime', 'memberCount'], function(err, groupData) {
|
|
|
|
@ -86,7 +85,6 @@ module.exports = function(Groups) {
|
|
|
|
|
async.apply(db.sortedSetAdd, 'groups:visible:createtime', groupData.createtime, groupName),
|
|
|
|
|
async.apply(db.sortedSetAdd, 'groups:visible:memberCount', groupData.memberCount, groupName),
|
|
|
|
|
async.apply(db.sortedSetAdd, 'groups:visible:name', 0, groupName.toLowerCase() + ':' + groupName),
|
|
|
|
|
async.apply(db.setObjectField, 'groupslug:groupname', utils.slugify(groupName), groupName)
|
|
|
|
|
], callback);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|