const models = require('../models');

const failureCtrl = module.exports = {};

failureCtrl.new = function (req, res) {
  models.Failure.create(req.body)
    .then(function () {
      res.redirect('/list');
    });
};

failureCtrl.list = function (req, res) {
  models.Failure.findAll()
    .then(function (failures) {
      res.json(failures);
    });
};

@@ -326,20 +326,316 @@
 res.
-js
+render('failures', %7B%0A        brand: 'Muddles',%0A        title: 'readAll',%0A        subtitle: 'The list of the things that suck.',%0A        failures,%0A      %7D);%0A    %7D);%0A%7D;%0A%0AfailureCtrl.read = function (req, res) %7B%0A  models.Failure.findOne(%7B%0A    where: %7B id: req.params.failureId %7D%0A  %7D)%0A    .then(functi
 on
+ 
 (failure
 s);%0A
@@ -630,17 +630,180 @@
 (failure
-s
+) %7B%0A      res.render('failure', %7B%0A        brand: 'Muddles',%0A        title: 'readOne',%0A        subtitle: 'The one of the things that suck.',%0A        failure,%0A      %7D
 );%0A    %7D

add read failure method