|
|
|
@ -88,11 +88,11 @@ const PlaceHolder = require('../service/configurations/PlaceHolder');
|
|
|
|
|
function addRoutes(app, peliasConfig) { |
|
|
|
|
const esclient = elasticsearch.Client(peliasConfig.esclient); |
|
|
|
|
|
|
|
|
|
const pipConfiguration = new PointInPolygon(peliasConfig.api.services.pip); |
|
|
|
|
const pipConfiguration = new PointInPolygon(_.defaultTo(peliasConfig.api.services.pip, {})); |
|
|
|
|
const pipService = serviceWrapper(pipConfiguration); |
|
|
|
|
const isPipServiceEnabled = _.constant(pipConfiguration.isEnabled()); |
|
|
|
|
|
|
|
|
|
const placeholderConfiguration = new PlaceHolder(_.get(peliasConfig.api.services, 'placeholder', {})); |
|
|
|
|
const placeholderConfiguration = new PlaceHolder(_.defaultTo(peliasConfig.api.services.placeholder, {})); |
|
|
|
|
const placeholderService = serviceWrapper(placeholderConfiguration); |
|
|
|
|
const isPlaceholderServiceEnabled = _.constant(placeholderConfiguration.isEnabled()); |
|
|
|
|
|
|
|
|
|