mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
sending in groupObj data into group.delete hook
This commit is contained in:
@@ -556,6 +556,9 @@ var async = require('async'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
Groups.destroy = function(groupName, callback) {
|
Groups.destroy = function(groupName, callback) {
|
||||||
|
Groups.get(groupName, {}, function(err, groupObj) {
|
||||||
|
plugins.fireHook('action:group.destroy', groupObj);
|
||||||
|
|
||||||
async.parallel([
|
async.parallel([
|
||||||
async.apply(db.delete, 'group:' + groupName),
|
async.apply(db.delete, 'group:' + groupName),
|
||||||
async.apply(db.setRemove, 'groups', groupName),
|
async.apply(db.setRemove, 'groups', groupName),
|
||||||
@@ -572,15 +575,8 @@ var async = require('async'),
|
|||||||
}, next);
|
}, next);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
], function(err) {
|
], callback);
|
||||||
if (!err) {
|
})
|
||||||
plugins.fireHook('action:group.destroy', {
|
|
||||||
name: groupName
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
callback(err);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Groups.join = function(groupName, uid, callback) {
|
Groups.join = function(groupName, uid, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user