Browse Source

fix: Merge pull request #1036 from pelias/improve-place-query

Corrrectly filter /place queries by layer
pull/1046/head
Julian Simioni 7 years ago committed by GitHub
parent
commit
ffc0f45493
  1. 2
      controller/place.js
  2. 4
      test/unit/controller/place.js

2
controller/place.js

@ -38,7 +38,7 @@ function setup( apiConfig, esclient ){
const cmd = req.clean.ids.map( function(id) { const cmd = req.clean.ids.map( function(id) {
return { return {
_index: apiConfig.indexName, _index: apiConfig.indexName,
_type: id.layers, _type: id.layer,
_id: id.id _id: id.id
}; };
}); });

4
test/unit/controller/place.js

@ -51,11 +51,11 @@ module.exports.tests.success = (test, common) => {
ids: [ ids: [
{ {
id: 'id1', id: 'id1',
layers: 'layer1' layer: 'layer1'
}, },
{ {
id: 'id2', id: 'id2',
layers: 'layer2' layer: 'layer2'
} }
] ]
}, },

Loading…
Cancel
Save