Browse Source

added iso2->iso3 conversion to /search endpoint

pull/727/head
Stephen Hess 8 years ago
parent
commit
0c54f502af
  1. 1
      sanitizer/search.js
  2. 5
      test/unit/sanitizer/search.js

1
sanitizer/search.js

@ -5,6 +5,7 @@ var sanitizeAll = require('../sanitizer/sanitizeAll'),
quattroshapes_deprecation: require('../sanitizer/_deprecate_quattroshapes'),
singleScalarParameters: require('../sanitizer/_single_scalar_parameters'),
text: require('../sanitizer/_text'),
iso2_to_iso3: require('../sanitizer/_iso2_to_iso3'),
size: require('../sanitizer/_size')(/* use defaults*/),
layers: require('../sanitizer/_targets')('layers', type_mapping.layer_mapping),
sources: require('../sanitizer/_targets')('sources', type_mapping.source_mapping),

5
test/unit/sanitizer/search.js

@ -21,6 +21,10 @@ module.exports.tests.sanitize = function(test, common) {
called_sanitizers.push('_text');
return { errors: [], warnings: [] };
},
'../sanitizer/_iso2_to_iso3': function() {
called_sanitizers.push('_iso2_to_iso3');
return { errors: [], warnings: [] };
},
'../sanitizer/_size': function() {
if (arguments.length === 0) {
return function() {
@ -81,6 +85,7 @@ module.exports.tests.sanitize = function(test, common) {
'_deprecate_quattroshapes',
'_single_scalar_parameters',
'_text',
'_iso2_to_iso3',
'_size',
'_targets/layers',
'_targets/sources',

Loading…
Cancel
Save