mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
possible fix to group category
This commit is contained in:
@@ -665,7 +665,14 @@ var async = require('async'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
Groups.destroy = function(groupName, callback) {
|
Groups.destroy = function(groupName, callback) {
|
||||||
Groups.get(groupName, {}, function(err, groupObj) {
|
Groups.getGroupsData([groupName], function(err, groupsData) {
|
||||||
|
if (err) {
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
|
if (!Array.isArray(groupsData) || !groupsData[0]) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
var groupObj = groupsData[0];
|
||||||
plugins.fireHook('action:group.destroy', groupObj);
|
plugins.fireHook('action:group.destroy', groupObj);
|
||||||
|
|
||||||
async.parallel([
|
async.parallel([
|
||||||
|
|||||||
Reference in New Issue
Block a user