function()

in app/api/routes/mongo.js [58:67]


      function(cb) {
        Hero.find({}).then(results => {
          for (i = 0; i < results.length; i++) {
            heroes[results[i]._id] = { 'name': results[i].name, 'img': results[i].img };
            if (i === results.length - 1) {
              cb(null, heroes);
            }
          }
        });
      },