Permalink
Browse files

fix the blind fix

  • Loading branch information...
=
= committed Nov 5, 2013
1 parent 8a09cf2 commit 6c6e552212c62e79c3682b227db5438f89c5740c
Showing with 10 additions and 13 deletions.
  1. +10 −13 index.js
View
@@ -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 6c6e552

Please sign in to comment.