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