From faaf121eb63c0826246e3ac3a91ffb11e3e3835a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 7 Mar 2018 18:51:43 +0100 Subject: [PATCH] Rename center and bbox middlewares --- lib/cartodb/controllers/layergroup.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 7c487c1e..9fbcce2c 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -124,7 +124,7 @@ LayergroupController.prototype.register = function(app) { allowQueryParams(['layer']), this.prepareContext, getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), - center(this.previewBackend), + getPreviewImageByCenter(this.previewBackend), setCacheControlHeader(), setLastModifiedHeader(), getAffectedTables(this.layergroupAffectedTables, this.pgConnection), @@ -140,7 +140,7 @@ LayergroupController.prototype.register = function(app) { allowQueryParams(['layer']), this.prepareContext, getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat), - bbox(this.previewBackend), + getPreviewImageByBoundingBox(this.previewBackend), setCacheControlHeader(), setLastModifiedHeader(), getAffectedTables(this.layergroupAffectedTables, this.pgConnection), @@ -422,8 +422,8 @@ function getTile (tileBackend, profileLabel = 'tile') { }; } -function center (previewBackend) { - return function centerMiddleware (req, res, next) { +function getPreviewImageByCenter (previewBackend) { + return function getPreviewImageByCenterMiddleware (req, res, next) { const width = +req.params.width; const height = +req.params.height; const zoom = +req.params.z; @@ -457,8 +457,8 @@ function center (previewBackend) { }; } -function bbox (previewBackend) { - return function bboxMiddleware (req, res, next) { +function getPreviewImageByBoundingBox (previewBackend) { + return function getPreviewImageByBoundingBoxMiddleware (req, res, next) { const width = +req.params.width; const height = +req.params.height; const bounds = {