more category hooks

This commit is contained in:
barisusakli
2015-06-19 15:39:33 -04:00
parent abfd58a1a9
commit dff1a04585
3 changed files with 13 additions and 2 deletions

View File

@@ -20,7 +20,13 @@ module.exports = function(Categories) {
var fields = Object.keys(category);
async.each(fields, function(key, next) {
updateCategoryField(cid, key, category[key], next);
}, next);
}, function(err) {
if (err) {
return next(err);
}
plugins.fireHook('action:category.update', {cid: cid, modified: category});
next();
});
});
});
}