From 6c2f8936516f496259bbff0a36d6a0ee5e2ad845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 7 Mar 2018 18:53:20 +0100 Subject: [PATCH] Rename map-store-map-config-provider middleware --- lib/cartodb/controllers/layergroup.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 9fbcce2c..9e09bec9 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -47,7 +47,7 @@ LayergroupController.prototype.register = function(app) { cors(), userMiddleware(), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getTile(this.tileBackend, 'map_tile'), setCacheControlHeader(), setLastModifiedHeader(), @@ -66,7 +66,7 @@ LayergroupController.prototype.register = function(app) { cors(), userMiddleware(), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getTile(this.tileBackend, 'map_tile'), setCacheControlHeader(), setLastModifiedHeader(), @@ -86,7 +86,7 @@ LayergroupController.prototype.register = function(app) { cors(), userMiddleware(), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getTile(this.tileBackend, 'maplayer_tile'), setCacheControlHeader(), setLastModifiedHeader(), @@ -105,7 +105,7 @@ LayergroupController.prototype.register = function(app) { cors(), userMiddleware(), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getFeatureAttributes(this.attributesBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -123,7 +123,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(['layer']), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), getPreviewImageByCenter(this.previewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -139,7 +139,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(['layer']), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), getPreviewImageByBoundingBox(this.previewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -173,7 +173,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(allowedDataviewQueryParams), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getDataview(this.dataviewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -189,7 +189,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(allowedDataviewQueryParams), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), getDataview(this.dataviewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -205,7 +205,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(allowedDataviewQueryParams), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), dataviewSearch(this.dataviewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -221,7 +221,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), allowQueryParams(allowedDataviewQueryParams), this.prepareContext, - getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), + createMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), dataviewSearch(this.dataviewBackend), setCacheControlHeader(), setLastModifiedHeader(), @@ -282,8 +282,8 @@ function getRequestParams(locals) { return params; } -function getMapStoreMapConfigProvider (mapStore, userLimitsApi, forcedFormat = null) { - return function getMapStoreMapConfigProviderMiddleware (req, res, next) { +function createMapStoreMapConfigProvider (mapStore, userLimitsApi, forcedFormat = null) { + return function createMapStoreMapConfigProviderMiddleware (req, res, next) { const { user } = res.locals; const params = getRequestParams(res.locals);