Use async v2

This commit is contained in:
Peter Jaszkowiak
2017-01-02 22:23:17 -07:00
parent cb82824c13
commit ec544518e8
9 changed files with 73 additions and 40 deletions

View File

@@ -8,12 +8,8 @@ var helpers = {};
helpers.some = function (tasks, callback) {
async.some(tasks, function (task, next) {
task(function (err, result) {
next(!err && result);
});
}, function (result) {
callback(null, result);
});
task(next);
}, callback);
};
helpers.isUserAllowedTo = function (privilege, uid, cid, callback) {