utilities/query-helper.js
function(query, mongooseQuery, logger) {
    if (query.$exclude) {
      if (!Array.isArray(query.$exclude)) {
        query.$exclude = query.$exclude.split(',')
      }

      mongooseQuery.where({ _id: { $nin: query.$exclude } })
      delete query.$exclude
    }
    return mongooseQuery
  }
function(query, mongooseQuery, logger) {
    if (query.$exclude) {
      if (!Array.isArray(query.$exclude)) {
        query.$exclude = query.$exclude.split(',')
      }

      mongooseQuery.where({ _id: { $nin: query.$exclude } })
      delete query.$exclude
    }
    return mongooseQuery
  }
function ( query , mongooseQuery , logger ) { if ( query . $exclude ) { if ( ! Array . isArray ( query . $exclude ) ) { query . $exclude = query . $exclude . split ( ',' ) } mongooseQuery . where ( { _id : { $nin : query . $exclude } } ) delete query . $exclude } return mongooseQuery }
Set the list of objectIds to exclude.
@param query: The incoming request query.
@param mongooseQuery: A mongoose query.
@param logger: A logging object.
@returns {*}: The updated mongoose query.
Set the list of objectIds to exclude .