Skip to content
Browse files

Merge pull request #3 from s1341/master

fix the blind fix
  • Loading branch information...
2 parents 8a09cf2 + 6c6e552 commit f47a0475d722af987d3116642406d696e62a9336 @JohnMcLear committed Nov 5, 2013
Showing with 10 additions and 13 deletions.
  1. +10 −13 index.js
View
23 index.js
@@ -16,21 +16,18 @@ exports.registerRoute = function (hook_name, args, cb) {
var pads = [];
var data = [];
- async.series([
+ async.waterfall([
function(callback){
- padManager.listAllPads(err, pads){
- async.forEach(pads, function(padID, callback){
- if(padID[0] == letter || padID[0] == letter.toUpperCase()){
- data.push(padID);
- }
- callback();
- },
- function(err){
- callback();
- });
- }
+ padManager.listAllPads(callback)
+ },
+ function (pads, callback) {
+ async.forEach(pads.padIDs, function(padID, callback) {
+ if(padID[0] == letter || padID[0] == letter.toUpperCase()){
+ data.push(padID);
+ }
+ });
+ callback();
},
-
function(callback){
var render_args = {
errors: [],

0 comments on commit f47a047

Please sign in to comment.
Something went wrong with that request. Please try again.