lib/utils/require-body.js
function requireBody(key, req, res) {
  var val = req.body[key];

  if (val === undefined) {
    return res.status(400).json({
      status: 'error',
      errors: [`you must supply parameter ${key}`]
    });
  }

  return val;
}
function requireBody(key, req, res) {
  var val = req.body[key];

  if (val === undefined) {
    return res.status(400).json({
      status: 'error',
      errors: [`you must supply parameter ${key}`]
    });
  }

  return val;
}
function requireBody ( key , req , res ) { var val = req . body [ key ] ; if ( val === undefined ) { return res . status ( 400 ) . json ( { status : 'error' , errors : [ ` ${ key } ` ] } ) ; } return val ; }
/*
Require a request parameter is present or return a 400 response.
/ * Require a request parameter is present or return a 400 response .