code: function(req, res, next) {
      Check
      .find({ _id: req.params.id })
      .select({qos: 0})
      .findOne(function(err, check) {
        if (err) return next(err);
        if (!check) return res.json(404, { error: 'failed to load check ' + req.params.id });
        req.check = check;
        next();
      });
    }
docs: check route middleware