some minor cleanup in the async tree...

v1.18.x
Julian Lam 10 years ago
parent 9daa2701cd
commit 8bc5330e89

@ -306,20 +306,22 @@ var async = require('async'),
function(count, next) { function(count, next) {
results.postData.reputation = count; results.postData.reputation = count;
posts.setPostField(pid, 'reputation', count, next); posts.setPostField(pid, 'reputation', count, next);
}, }
function(next) { ], function(err) {
if (err) {
return callback(err);
}
plugins.fireHook('action:post.' + type, { plugins.fireHook('action:post.' + type, {
pid: pid, pid: pid,
uid: uid, uid: uid,
}, next); });
},
function(next) { callback(null, {
next(null, {
post: results.postData, post: results.postData,
isFavourited: isFavouriting isFavourited: isFavouriting
}); });
} });
], callback);
}); });
} }

Loading…
Cancel
Save