mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
pass array to groups.destroy
pass array to db.sortedSetRemove
This commit is contained in:
@@ -58,9 +58,9 @@ module.exports = function (Categories) {
|
||||
], next);
|
||||
},
|
||||
function (next) {
|
||||
async.eachSeries(privileges.privilegeList, function (privilege, next) {
|
||||
groups.destroy('cid:' + cid + ':privileges:' + privilege, next);
|
||||
}, next);
|
||||
groups.destroy(privileges.privilegeList.map(function (privilege) {
|
||||
return 'cid:' + cid + ':privileges:' + privilege;
|
||||
}), next);
|
||||
},
|
||||
], function (err) {
|
||||
callback(err);
|
||||
|
||||
Reference in New Issue
Block a user