diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index 5eb89b58..9b8694f8 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -5,7 +5,6 @@ const Datasource = windshaft.model.Datasource; const ResourceLocator = require('../models/resource-locator'); const cors = require('../middleware/cors'); const user = require('../middleware/user'); -const locals = require('../middleware/locals'); const cleanUpQueryParams = require('../middleware/clean-up-query-params'); const layergroupToken = require('../middleware/layergroup-token'); const credentials = require('../middleware/credentials'); @@ -103,7 +102,6 @@ MapController.prototype.composeCreateMapMiddleware = function (endpointGroup, us return [ cors(), cleanUpQueryParams(['aggregation']), - locals(), user(), rateLimit(this.userLimitsApi, endpointGroup), layergroupToken(), @@ -214,7 +212,7 @@ function checkInstantiteLayergroup () { function checkCreateLayergroup () { return function checkCreateLayergroupMiddleware (req, res, next) { if (req.method === 'GET') { - const { config } = res.locals; + const { config } = req.query; if (!config) { return next(new Error('layergroup GET needs a "config" parameter'));