|
|
@ -13,8 +13,7 @@ var sanitisers = { |
|
|
|
|
|
|
|
|
|
|
|
/** ----------------------- middleware ------------------------ **/ |
|
|
|
/** ----------------------- middleware ------------------------ **/ |
|
|
|
var middleware = { |
|
|
|
var middleware = { |
|
|
|
calcSize: require('../middleware/sizeCalculator'), |
|
|
|
calcSize: require('../middleware/sizeCalculator') |
|
|
|
generatePermutations: require('../middleware/generatePermutations') |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** ----------------------- controllers ----------------------- **/ |
|
|
|
/** ----------------------- controllers ----------------------- **/ |
|
|
@ -29,6 +28,7 @@ var controllers = { |
|
|
|
/** ----------------------- controllers ----------------------- **/ |
|
|
|
/** ----------------------- controllers ----------------------- **/ |
|
|
|
|
|
|
|
|
|
|
|
var postProc = { |
|
|
|
var postProc = { |
|
|
|
|
|
|
|
trimByGranularity: require('../middleware/trimByGranularity'), |
|
|
|
distances: require('../middleware/distance'), |
|
|
|
distances: require('../middleware/distance'), |
|
|
|
confidenceScores: require('../middleware/confidenceScore'), |
|
|
|
confidenceScores: require('../middleware/confidenceScore'), |
|
|
|
confidenceScoresReverse: require('../middleware/confidenceScoreReverse'), |
|
|
|
confidenceScoresReverse: require('../middleware/confidenceScoreReverse'), |
|
|
@ -64,6 +64,7 @@ function addRoutes(app, peliasConfig) { |
|
|
|
sanitisers.search.middleware, |
|
|
|
sanitisers.search.middleware, |
|
|
|
middleware.calcSize(), |
|
|
|
middleware.calcSize(), |
|
|
|
controllers.search(peliasConfig), |
|
|
|
controllers.search(peliasConfig), |
|
|
|
|
|
|
|
postProc.trimByGranularity(), |
|
|
|
postProc.distances('focus.point.'), |
|
|
|
postProc.distances('focus.point.'), |
|
|
|
postProc.confidenceScores(peliasConfig), |
|
|
|
postProc.confidenceScores(peliasConfig), |
|
|
|
postProc.dedupe(), |
|
|
|
postProc.dedupe(), |
|
|
|