pass the data used to create the category to filter:category.create

This commit is contained in:
barisusakli
2015-07-16 15:56:26 -04:00
parent e023d01616
commit 0be2a79210
2 changed files with 7 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ module.exports = function(Categories) {
imageClass: 'auto'
};
plugins.fireHook('filter:category.create', {category: category}, next);
plugins.fireHook('filter:category.create', {category: category, data: data}, next);
},
function(data, next) {
category = data.category;

View File

@@ -23,6 +23,10 @@ module.exports = function(Categories) {
}
plugins.fireHook('filter:category.update', {category: modifiedFields}, function(err, categoryData) {
if (err) {
return next(err);
}
var category = categoryData.category;
var fields = Object.keys(category);
async.each(fields, function(key, next) {