From 58a3a91793dbda2f58e7d5fa911e7ad475f9c23d Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Tue, 2 Aug 2016 11:59:41 -0400 Subject: [PATCH] added `trimByGranularity` post-processing step --- routes/v1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(),