diff --git a/routes/v1.js b/routes/v1.js index 468c5211..dd5ba0a9 100644 --- a/routes/v1.js +++ b/routes/v1.js @@ -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(),