function setForeignKeys (request, baseQuery) {
  if (typeof baseQuery === 'undefined') {
    return
  }
  
  _.forEach(baseQuery(request), function(v, k) {
    request.payload[k] = request.params[k]
  })
}
function setForeignKeys (request, baseQuery) {
  if (typeof baseQuery === 'undefined') {
    return
  }
  
  _.forEach(baseQuery(request), function(v, k) {
    request.payload[k] = request.params[k]
  })
}
function setForeignKeys ( request , baseQuery ) { if ( typeof baseQuery === 'undefined' ) { return } _ . forEach ( baseQuery ( request ) , function ( v , k ) { request . payload [ k ] = request . params [ k ] } ) }
Copies the value of the foreign keys, as defined in baseQuery, provided by request.params, to the request.payload model.
Copies the value of the foreign keys as defined in baseQuery provided by request . params to the request . payload model .