noobling/Homefornow

Landing page shows transitional accommodations when it should show crisis accommodations

Opened this issue · 1 comments

Landing page shows transitional accommodations when it should show crisis accommodations

Putting this on hold because its hard to add this feature becaues this is the controlller code

async.parallel(
    {
      crisis: (callback) => { findService(callback, 'crisis'); },
      transitional: (callback) => { findService(callback, 'transitional'); },
    },
    (err, services) => {
      if (err) {
        console.log('[ERROR] IndexController: '.concat(err));
      }

      Promise.all([
        images.getImageForService(services.crisis.img[0], services.crisis.uri),
        images.getImageForService(services.transitional.img[0], services.transitional.uri),
      ]).then(([result1, result2, result3]) => {
        res.render('index', {
          user: req.user,
          crisis: services.crisis,
          transitional: services.transitional,
          images: [result1, result2, result3],
          title1: 'Let\'s find a',
          title2: 'Home for now',
        });
      }).catch((error) => {
        console.log('[ERROR] IndexController: ', error);
      });
    },
  );

Images are hard coded lol