Browse Source

Revert "adding geoname to coarse [experimental]"

This reverts commit 2424b0c9e2.
pull/66/head
Harish Krishna 10 years ago
parent
commit
827a93be11
  1. 4
      helper/queryMixer.json
  2. 2
      sanitiser/coarse.js
  3. 4
      test/unit/sanitiser/coarse.js

4
helper/queryMixer.json

@ -27,11 +27,11 @@
],
"coarse": [
{
"layers": ["admin", "geoname"],
"layers": ["admin"],
"precision": [5, 3, 1]
},
{
"layers": ["admin", "geoname"],
"layers": ["admin"],
"precision": [3],
"fuzzy": "AUTO"
}

2
sanitiser/coarse.js

@ -5,7 +5,7 @@ var logger = require('../src/logger'),
input: require('../sanitiser/_input'),
size: require('../sanitiser/_size'),
layers: function( req ) {
req.query.layers = 'admin,geoname';
req.query.layers = 'admin';
var layers = require('../sanitiser/_layers');
return layers(req);
},

4
test/unit/sanitiser/coarse.js

@ -2,7 +2,7 @@
var coarse = require('../../../sanitiser/coarse'),
_sanitize = coarse.sanitize,
middleware = coarse.middleware,
valid_layers = [ 'geoname', 'admin0', 'admin1', 'admin2', 'neighborhood' ],
valid_layers = [ 'admin0', 'admin1', 'admin2', 'neighborhood' ],
sanitize = function(query, cb) { _sanitize({'query':query}, cb); };
module.exports.tests = {};
@ -51,7 +51,7 @@ module.exports.tests.middleware_success = function(test, common) {
var defaultClean = {
input: 'test',
size: 10,
layers: [ 'geoname', 'admin0', 'admin1', 'admin2', 'neighborhood' ],
layers: [ 'admin0', 'admin1', 'admin2', 'neighborhood' ],
lat: 0,
lon: 0
};

Loading…
Cancel
Save