|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
var async = require('async'),
|
|
|
|
|
db = require('../database'),
|
|
|
|
|
batch = require('../batch'),
|
|
|
|
|
plugins = require('../plugins'),
|
|
|
|
|
threadTools = require('../threadTools');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,7 +18,10 @@ module.exports = function(Categories) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
purgeCategory(cid, callback);
|
|
|
|
|
async.series([
|
|
|
|
|
async.apply(purgeCategory, cid),
|
|
|
|
|
async.apply(plugins.fireHook, 'action:category.delete', cid)
|
|
|
|
|
], callback);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|