diff --git a/sanitiser/_layers.js b/sanitiser/_layers.js deleted file mode 100644 index b7922557..00000000 --- a/sanitiser/_layers.js +++ /dev/null @@ -1,46 +0,0 @@ - -var check = require('check-types'), - types = require('../query/types'), - get_layers = require('../helper/layers'); - -// decide which layers can be queried -var ALIAS_LAYERS = ['poi', 'admin', 'address'], - ALIAS_TYPES = types.concat(ALIAS_LAYERS), - ALIAS_TYPES_JOINED = ALIAS_TYPES.join(','); - -// validate inputs, convert types and apply defaults -function sanitize( raw, clean ){ - - // error & warning messages - var messages = { errors: [], warnings: [] }; - - // init clean.types - clean.types = clean.types || {}; - - // default case (no layers specified in GET params) - // don't even set the from_layers key in this case - if( check.unemptyString( raw.layers ) ){ - - // parse GET params - var layers = raw.layers.split(',').map( function( layer ){ - return layer.toLowerCase(); // lowercase inputs - }); - - // validate layer names - for( var x=0; x