From b94dfe066da7e83e241b9328f7bf26d833210443 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 26 Sep 2017 15:39:48 +0200 Subject: [PATCH] removing some repeated things --- lib/cartodb/middleware/context/authorize.js | 3 --- lib/cartodb/middleware/context/clean-up-query-params.js | 5 ----- 2 files changed, 8 deletions(-) diff --git a/lib/cartodb/middleware/context/authorize.js b/lib/cartodb/middleware/context/authorize.js index 65bed758..439b4418 100644 --- a/lib/cartodb/middleware/context/authorize.js +++ b/lib/cartodb/middleware/context/authorize.js @@ -2,9 +2,6 @@ const _ = require('underscore'); module.exports = function authorizeMiddleware (authApi) { return function (req, res, next) { - // bring all query values onto req.params object - _.extend(req.params, req.query); - // FIXME: Temporary hack to share data between middlewares. Express overrides req.params to // parse url params to an object and it's performed after matching path and controller. req.locals = {}; diff --git a/lib/cartodb/middleware/context/clean-up-query-params.js b/lib/cartodb/middleware/context/clean-up-query-params.js index d756396c..7b0b56eb 100644 --- a/lib/cartodb/middleware/context/clean-up-query-params.js +++ b/lib/cartodb/middleware/context/clean-up-query-params.js @@ -27,11 +27,6 @@ module.exports = function cleanUpQueryParamsMiddleware () { // bring all query values onto req.params object _.extend(req.params, req.query); - // FIXME: Temporary hack to share data between middlewares. Express overrides req.params to - // parse url params to an object and it's performed after matching path and controller. - req.locals = {}; - _.extend(req.locals, req.params); - next(); }; };