Browse Source

Add categories sanitizer to reverse

pull/546/head
Diana Shkolnikov 9 years ago
parent
commit
68c6b15e0f
  1. 1
      sanitiser/reverse.js
  2. 2
      test/unit/sanitiser/reverse.js

1
sanitiser/reverse.js

@ -12,6 +12,7 @@ var sanitizeAll = require('../sanitiser/sanitizeAll'),
private: require('../sanitiser/_flag_bool')('private', false),
geo_reverse: require('../sanitiser/_geo_reverse'),
boundary_country: require('../sanitiser/_boundary_country'),
categories: require('../sanitiser/_categories')
};
var sanitize = function(req, cb) { sanitizeAll(req, sanitizers, cb); };

2
test/unit/sanitiser/reverse.js

@ -37,7 +37,7 @@ module.exports.tests.interface = function(test, common) {
module.exports.tests.sanitisers = function(test, common) {
test('check sanitiser list', function (t) {
var expected = ['quattroshapes_deprecation', 'singleScalarParameters', 'layers',
'sources', 'sources_and_layers', 'size', 'private', 'geo_reverse', 'boundary_country'];
'sources', 'sources_and_layers', 'size', 'private', 'geo_reverse', 'boundary_country', 'categories'];
t.deepEqual(Object.keys(reverse.sanitiser_list), expected);
t.end();
});

Loading…
Cancel
Save