Browse Source

readability

pull/61/head
Peter Johnson 10 years ago
parent
commit
d93709fffb
  1. 1
      package.json
  2. 6
      sanitiser/_layers.js

1
package.json

@ -37,6 +37,7 @@
"geojson": "^0.2.0",
"geojson-extent": "^0.3.1",
"geopipes-elasticsearch-backend": "0.0.8",
"is-object": "^1.0.1",
"pelias-esclient": "0.0.25",
"toobusy": "^0.2.4"
},

6
sanitiser/_layers.js

@ -1,4 +1,6 @@
var indeces = require('../query/indeces');
var isObject = require('is-object'),
indeces = require('../query/indeces');
// validate inputs, convert types and apply defaults
function sanitize( req ){
@ -7,7 +9,7 @@ function sanitize( req ){
var params= req.query;
// ensure the input params are a valid object
if( Object.prototype.toString.call( params ) !== '[object Object]' ){
if( !isObject( params ) ){
params = {};
}

Loading…
Cancel
Save