Skip to content

Instantly share code, notes, and snippets.

@admc
Created July 31, 2013 00:19
Show Gist options
  • Save admc/6118262 to your computer and use it in GitHub Desktop.
Save admc/6118262 to your computer and use it in GitHub Desktop.
var syncArr = [];
messages.forEach(function(message) {
var f = function(cb) {
message.getUser(function(err, user) {
message.username = user.username;
cb(null, user);
})
};
syncArr.push(f)
});
async.series(syncArr, function(err, results) {
params.messages = messages;
self.respond(params);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment