From d13d107aea8ca8d1a1b09bee2931969d60460b62 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 29 Jun 2015 19:18:52 +0200 Subject: [PATCH] Adds names to functions --- lib/cartodb/controllers/named_maps.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cartodb/controllers/named_maps.js b/lib/cartodb/controllers/named_maps.js index 9c8cbe57..3c3a2114 100644 --- a/lib/cartodb/controllers/named_maps.js +++ b/lib/cartodb/controllers/named_maps.js @@ -111,7 +111,7 @@ NamedMapsController.prototype.retrieve = function(req, res) { function checkPerms(){ self.serverOptions.authorizedByAPIKey(req, this); }, - function updateTemplate(err, authenticated) { + function getTemplate(err, authenticated) { assert.ifError(err); ifUnauthenticated(authenticated, 'Only authenticated users can get template maps'); @@ -149,7 +149,7 @@ NamedMapsController.prototype.destroy = function(req, res) { function checkPerms(){ self.serverOptions.authorizedByAPIKey(req, this); }, - function updateTemplate(err, authenticated) { + function deleteTemplate(err, authenticated) { assert.ifError(err); ifUnauthenticated(authenticated, 'Only authenticated users can delete template maps'); @@ -199,11 +199,11 @@ NamedMapsController.prototype.instantiate = function(req, res) { req.profiler.start('windshaft-cartodb.instance_template_post'); } step( - function() { + function instantiateTemplate() { ifInvalidContentType(req, 'template POST data must be of type application/json'); self.instantiateTemplate(req, res, req.body, this); - }, function(err, response) { + }, function finishInstantiation(err, response) { self.finish_instantiation(err, response, res); } ); @@ -225,7 +225,7 @@ NamedMapsController.prototype.jsonp = function(req, res) { req.profiler.start('windshaft-cartodb.instance_template_get'); } step( - function() { + function instantiateTemplate() { if ( req.query.callback === undefined || req.query.callback.length === 0) { throw new Error('callback parameter should be present and be a function name'); } @@ -238,7 +238,7 @@ NamedMapsController.prototype.jsonp = function(req, res) { } } self.instantiateTemplate(req, res, config, this); - }, function(err, response) { + }, function finishInstantiation(err, response) { self.finish_instantiation(err, response, res); } );