From 7bdbd4cb0357adf06472512d907278c7706152e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 16 Mar 2018 16:42:47 +0100 Subject: [PATCH] Move variable declaration --- lib/cartodb/controllers/map.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index 067dc789..52d71f93 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -53,11 +53,12 @@ module.exports = MapController; MapController.prototype.register = function(app) { const { base_url_mapconfig: mapconfigBasePath, base_url_templated: templateBasePath } = app; - const useTemplate = true; app.get(`${mapconfigBasePath}`, this.composeCreateMapMiddleware()); app.post(`${mapconfigBasePath}`, this.composeCreateMapMiddleware()); + const useTemplate = true; + app.get(`${templateBasePath}/:template_id/jsonp`, this.composeCreateMapMiddleware(useTemplate)); app.post(`${templateBasePath}/:template_id`, this.composeCreateMapMiddleware(useTemplate));