Browse Source

Remove unnecessary calls to function

pull/273/head
Julian Simioni 9 years ago
parent
commit
399e566551
  1. 8
      sanitiser/_ids.js

8
sanitiser/_ids.js

@ -62,9 +62,7 @@ function sanitize( raw, clean ){
// basic format/ presence of ':' // basic format/ presence of ':'
if(param_index === -1) { if(param_index === -1) {
messages.errors.push( messages.errors.push( 'invalid: must be of the format type:id for ex: \'geoname:4163334\'' );
errorMessage(null, 'invalid: must be of the format type:id for ex: \'geoname:4163334\'')
);
} }
// id text // id text
@ -77,9 +75,7 @@ function sanitize( raw, clean ){
} }
// type text must be one of the types // type text must be one of the types
else if( !_.contains( types, type ) ){ else if( !_.contains( types, type ) ){
messages.errors.push( messages.errors.push( type + ' is invalid. It must be one of these values - [' + types.join(', ') + ']' );
errorMessage('type', type + ' is invalid. It must be one of these values - [' + types.join(', ') + ']')
);
} }
// add valid id to 'clean.ids' array // add valid id to 'clean.ids' array
else { else {

Loading…
Cancel
Save