nl_tokens: Require the specified req . body parameters or else return a 400 with a descriptive JSON body
pl_tokens: function requireBody ( paramsList ) { return function ( req , res , next ) { var errors = [ ] ; var status = 'ok' ; for ( var i = 0 ; i < paramsList . length ; i ++ ) { var val = req . body [ paramsList [ i ] ] ; if ( ! val ) { errors . push ( ` \` ${ paramsList [ i ] } \` ` ) ; status = 'error' ; } } if ( errors . length === 0 ) { next ( ) ; } else { return res . status ( 400 ) . json ( { errors : errors , status : <mask> } ) ; } } ; }