lib/mbaasRequest/mbaasRequest.js
function adminRequest(params, cb) {
  params = params || {};
  var mbaasConf = params[constants.MBAAS_CONF_KEY];
  params[constants.MBAAS_CONF_KEY] = undefined;
  log.logger.debug({params: params}, "FH-MBAAS-CLIENT: adminRequest ");
  var fullParams = _.extend(_.clone(params), mbaasConf);
  log.logger.info({
    env: params.environment,
    domain: fullParams.domain,
    mbaasUrl: fullParams.__mbaasUrl
  }, "FH-MBAAS-CLIENT.adminRequest - calling mbaas:");
  var invalidParamError = validateAdminParams(fullParams);

  if (invalidParamError) {
    return cb(invalidParamError);
  }

  fullParams.data = fullParams.data || {};
  fullParams.data.notStats = params.notStats;
  fullParams = _buildAdminMbaasParams(fullParams);

  log.logger.debug({fullParams: fullParams}, "FH-MBAAS-CLIENT: adminRequest ");

  return doFHMbaaSRequest(fullParams, cb);
}
function adminRequest(params, cb) {
  params = params || {};
  var mbaasConf = params[constants.MBAAS_CONF_KEY];
  params[constants.MBAAS_CONF_KEY] = undefined;
  log.logger.debug({params: params}, "FH-MBAAS-CLIENT: adminRequest ");
  var fullParams = _.extend(_.clone(params), mbaasConf);
  log.logger.info({
    env: params.environment,
    domain: fullParams.domain,
    mbaasUrl: fullParams.__mbaasUrl
  }, "FH-MBAAS-CLIENT.adminRequest - calling mbaas:");
  var invalidParamError = validateAdminParams(fullParams);

  if (invalidParamError) {
    return cb(invalidParamError);
  }

  fullParams.data = fullParams.data || {};
  fullParams.data.notStats = params.notStats;
  fullParams = _buildAdminMbaasParams(fullParams);

  log.logger.debug({fullParams: fullParams}, "FH-MBAAS-CLIENT: adminRequest ");

  return doFHMbaaSRequest(fullParams, cb);
}
function adminRequest ( params , cb ) { params = params || { } ; var mbaasConf = params [ constants . MBAAS_CONF_KEY ] ; params [ constants . MBAAS_CONF_KEY ] = undefined ; log . logger . debug ( { params : params } , "FH-MBAAS-CLIENT: adminRequest " ) ; var fullParams = _ . extend ( _ . clone ( params ) , mbaasConf ) ; log . logger . info ( { env : params . environment , domain : fullParams . domain , mbaasUrl : fullParams . __mbaasUrl } , "FH-MBAAS-CLIENT.adminRequest - calling mbaas:" ) ; var invalidParamError = validateAdminParams ( fullParams ) ; if ( invalidParamError ) { return cb ( invalidParamError ) ; } fullParams . data = fullParams . data || { } ; fullParams . data . notStats = params . notStats ; fullParams = _buildAdminMbaasParams ( fullParams ) ; log . logger . debug ( { fullParams : fullParams } , "FH-MBAAS-CLIENT: adminRequest " ) ; return doFHMbaaSRequest ( fullParams , cb ) ; }
Performing A Request Against The Admin MBaaS API
@param params
@param cb
Performing A Request Against The Admin MBaaS API