fix tests

This commit is contained in:
barisusakli
2017-04-19 13:09:16 -04:00
parent 0d1d8f3874
commit d8170d5d1c
2 changed files with 4 additions and 5 deletions

View File

@@ -104,10 +104,10 @@ module.exports = function (Posts) {
plugins.fireHook('filter:post.get', { post: postData, uid: data.uid }, next);
});
},
function (postData, next) {
postData.isMain = isMain;
plugins.fireHook('action:post.save', { post: _.clone(postData) });
next(null, postData);
function (data, next) {
data.post.isMain = isMain;
plugins.fireHook('action:post.save', { post: _.clone(data.post) });
next(null, data.post);
},
], callback);
};