api/post/pid route

This commit is contained in:
Barış Soner Uşaklı
2015-02-24 13:02:58 -05:00
parent 52aa7d27e8
commit c94c1430b7
7 changed files with 49 additions and 6 deletions

View File

@@ -153,9 +153,10 @@ module.exports = function(privileges) {
helpers.some([
function(next) {
posts.getCidByPid(pid, function(err, cid) {
if (err) {
return next(err);
if (err || !cid) {
return next(err, false);
}
user.isModerator(uid, cid, next);
});
},