lib/impl/dataSources/update.js
function validateParams(dataSource, cb) {
  var dataSourceValidator = validate(dataSource);
  //The data source parameter should have an ID property.
  dataSourceValidator.has(CONSTANTS.DATA_SOURCE_ID, function(err) {
    if (err) {
      return cb(buildErrorResponse({error: new Error("An ID Parameter Is Required To Update A Data Source"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
    }

    //Data Source Cache Should Not Be Updated With This Function
    dataSourceValidator.hasno(CONSTANTS.DATA_SOURCE_DATA, CONSTANTS.DATA_SOURCE_CACHE, function() {
      if (err) {
        return cb(buildErrorResponse({error: new Error("Updating A Data Source Should Not Include Cache Data"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
      }

      cb(undefined, dataSource);
    });
  });
}
function validateParams(dataSource, cb) {
  var dataSourceValidator = validate(dataSource);
  //The data source parameter should have an ID property.
  dataSourceValidator.has(CONSTANTS.DATA_SOURCE_ID, function(err) {
    if (err) {
      return cb(buildErrorResponse({error: new Error("An ID Parameter Is Required To Update A Data Source"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
    }

    //Data Source Cache Should Not Be Updated With This Function
    dataSourceValidator.hasno(CONSTANTS.DATA_SOURCE_DATA, CONSTANTS.DATA_SOURCE_CACHE, function() {
      if (err) {
        return cb(buildErrorResponse({error: new Error("Updating A Data Source Should Not Include Cache Data"), code: ERROR_CODES.FH_FORMS_INVALID_PARAMETERS}));
      }

      cb(undefined, dataSource);
    });
  });
}
function validateParams ( dataSource , cb ) { var dataSourceValidator = validate ( dataSource ) ; //The data source parameter should have an ID property. dataSourceValidator . has ( CONSTANTS . DATA_SOURCE_ID , function ( err ) { if ( err ) { return cb ( buildErrorResponse ( { error : new Error ( "An ID Parameter Is Required To Update A Data Source" ) , code : ERROR_CODES . FH_FORMS_INVALID_PARAMETERS } ) ) ; } //Data Source Cache Should Not Be Updated With This Function dataSourceValidator . hasno ( CONSTANTS . DATA_SOURCE_DATA , CONSTANTS . DATA_SOURCE_CACHE , function ( ) { if ( err ) { return cb ( buildErrorResponse ( { error : new Error ( "Updating A Data Source Should Not Include Cache Data" ) , code : ERROR_CODES . FH_FORMS_INVALID_PARAMETERS } ) ) ; } cb ( undefined , dataSource ) ; } ) ; } ) ; }
validateParams - Validating A Data Source For Update. Should Have A _id parameter and no Data Set.

@param  {object} dataSource Data Source To Update
@param  {function} cb       Callback
@return {undefined}
validateParams - Validating A Data Source For Update . Should Have A _id parameter and no Data Set .