From 6ea10aa7e37d14f83cdd4a4e91ea441367078b8e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 12 Nov 2014 11:07:11 -0500 Subject: [PATCH] ensuring that the filter:category.get hook always sends data in the same format --- src/controllers/categories.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 812737de7f..4a43a6bb4b 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -27,7 +27,7 @@ categoriesController.recent = function(req, res, next) { data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; - plugins.fireHook('filter:category.get', {category: data, uid: uid}, function(err, data) { + plugins.fireHook('filter:category.get', {category: {topics: data}, uid: uid}, function(err, data) { if (err) { return next(err); } @@ -78,7 +78,7 @@ categoriesController.unread = function(req, res, next) { return next(err); } - plugins.fireHook('filter:category.get', {category: data, uid: uid}, function(err, data) { + plugins.fireHook('filter:category.get', {category: {topics: data}, uid: uid}, function(err, data) { if (err) { return next(err); }