cleanup and tests

This commit is contained in:
Baris Usakli
2017-05-25 16:40:03 -04:00
parent 82cab53508
commit 062bced3dd
12 changed files with 587 additions and 559 deletions

View File

@@ -102,12 +102,12 @@ module.exports = function (Posts) {
db.incrObjectField('global', 'postCount', next);
},
], function (err) {
if (err) {
return next(err);
}
plugins.fireHook('filter:post.get', { post: postData, uid: data.uid }, next);
next(err);
});
},
function (next) {
plugins.fireHook('filter:post.get', { post: postData, uid: data.uid }, next);
},
function (data, next) {
data.post.isMain = isMain;
plugins.fireHook('action:post.save', { post: _.clone(data.post) });