Browse Source

renamed variable for clarity

pull/782/head
Stephen Hess 8 years ago
parent
commit
40e6b1b3b7
  1. 4
      controller/place.js
  2. 4
      controller/search.js

4
controller/place.js

@ -1,7 +1,7 @@
var service = { mget: require('../service/mget') };
var logger = require('pelias-logger').get('api');
function setup( config, esclient ){
function setup( apiConfig, esclient ){
function controller( req, res, next ){
// do not run controller when a request
@ -12,7 +12,7 @@ function setup( config, esclient ){
var query = req.clean.ids.map( function(id) {
return {
_index: config.indexName,
_index: apiConfig.indexName,
_type: id.layers,
_id: id.id
};

4
controller/search.js

@ -7,7 +7,7 @@ var logger = require('pelias-logger').get('api');
var logging = require( '../helper/logging' );
const retry = require('retry');
function setup( config, esclient, query ){
function setup( apiConfig, esclient, query ){
function controller( req, res, next ){
// do not run controller when a request
// validation error has occurred.
@ -55,7 +55,7 @@ function setup( config, esclient, query ){
// elasticsearch command
var cmd = {
index: config.indexName,
index: apiConfig.indexName,
searchType: 'dfs_query_then_fetch',
body: renderedQuery.body
};

Loading…
Cancel
Save