|
|
@ -51,16 +51,15 @@ marked.setOptions({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function addUserInfoToPosts(next) {
|
|
|
|
function addUserInfoToPosts(next) {
|
|
|
|
var done = 0;
|
|
|
|
function iterator(post, callback) {
|
|
|
|
|
|
|
|
posts.addUserInfoToPost(post, function() {
|
|
|
|
for(var i=0, ii=postData.length; i<ii; ++i) {
|
|
|
|
callback(null);
|
|
|
|
|
|
|
|
|
|
|
|
posts.addUserInfoToPost(postData[i], function() {
|
|
|
|
|
|
|
|
++done;
|
|
|
|
|
|
|
|
if(done === postData.length)
|
|
|
|
|
|
|
|
next(null, null);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async.each(postData, iterator, function(err) {
|
|
|
|
|
|
|
|
next(err, null);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getPrivileges(next) {
|
|
|
|
function getPrivileges(next) {
|
|
|
|