diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index cae44899..c1510264 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -67,9 +67,12 @@ LayergroupController.prototype.register = function(app) { '/:token/:layer/:z/:x/:y.(:format)', cors(), userMiddleware, this.layer.bind(this)); - app.get(app.base_url_mapconfig + - '/:token/:layer/attributes/:fid', cors(), userMiddleware, - this.attributes.bind(this)); + app.get(app.base_url_mapconfig + '/:token/:layer/attributes/:fid', + cors(), + userMiddleware, + this.req2paramsMiddleware, + this.attributes.bind(this) + ); app.get(app.base_url_mapconfig + '/static/center/:token/:z/:lat/:lng/:width/:height.:format', cors(), @@ -223,12 +226,7 @@ LayergroupController.prototype.attributes = function(req, res, next) { req.profiler.start('windshaft.maplayer_attribute'); step( - function setupParams() { - self.req2params(req, res, this); - }, - function retrieveFeatureAttributes(err) { - assert.ifError(err); - + function retrieveFeatureAttributes() { var mapConfigProvider = new MapStoreMapConfigProvider( self.mapStore, req.context.user, self.userLimitsApi, req.params );