diff --git a/lib/cartodb/controllers/template_maps.js b/lib/cartodb/controllers/template_maps.js index bfc00f33..d9762702 100644 --- a/lib/cartodb/controllers/template_maps.js +++ b/lib/cartodb/controllers/template_maps.js @@ -136,7 +136,7 @@ TemplateMapsController.prototype.update = function(req, res) { TemplateMapsController.prototype.retrieve = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client ) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.get_template'); } @@ -198,7 +198,7 @@ TemplateMapsController.prototype.retrieve = function(req, res) { TemplateMapsController.prototype.destroy = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client ) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.delete_template'); } this.app.doCORS(res); @@ -250,8 +250,7 @@ TemplateMapsController.prototype.destroy = function(req, res) { // Get a list of owned templates TemplateMapsController.prototype.list = function(req, res) { var self = this; - - if ( req.profiler && req.profiler.statsd_client ) { + if ( req.profiler ) { req.profiler.start('windshaft-cartodb.get_template_list'); } this.app.doCORS(res); @@ -295,7 +294,7 @@ TemplateMapsController.prototype.list = function(req, res) { TemplateMapsController.prototype.instantiate = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.instance_template_post'); } step( @@ -322,7 +321,7 @@ TemplateMapsController.prototype.options = function(req, res, next) { TemplateMapsController.prototype.jsonp = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.instance_template_get'); } step(