diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 1f6f8d4f..341dc5f3 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -48,7 +48,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), this.prepareContext, getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), - tile(this.tileBackend), + getTile(this.tileBackend), setCacheControlHeader(), setLastModifiedHeader(), getAffectedTables(this.layergroupAffectedTables, this.pgConnection), @@ -67,7 +67,7 @@ LayergroupController.prototype.register = function(app) { userMiddleware(), this.prepareContext, getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi), - tile(this.tileBackend), + getTile(this.tileBackend), setCacheControlHeader(), setLastModifiedHeader(), getAffectedTables(this.layergroupAffectedTables, this.pgConnection), @@ -394,7 +394,7 @@ function parseFormat (format = '') { return formatStat; } -function tile (tileBackend) { +function getTile (tileBackend) { return function tileMiddleware (req, res, next) { req.profiler.start('windshaft.map_tile');