diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index ef53884c..0aadeaa7 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -197,31 +197,8 @@ module.exports = function(redisPool) { } return [req.params.table]; } - var user, key; - var next = this; - Step ( - function findUserKey() { - if ( req.params.hasOwnProperty('_authorizedBySigner') ) { - user = req.params._authorizedBySigner; - cartoData.getUserMapKey(user, this); - } else { - user = that.userByReq(req); - key = req.params.map_key || req.params.api_key; - return null; - } - }, - function getAffected(err, data) { - if ( err ) throw err; - if ( data ) { - if ( req.profiler ) req.profiler.done('getSignerMapKey'); - key = data; - } - queryTablesApi.getAffectedTablesInQuery(user, sql, this); // in addCacheChannel - }, - function finish(err, data) { - next(err,data); - } - ); + + queryTablesApi.getAffectedTablesInQuery(that.userByReq(req), sql, this); // in addCacheChannel }, function buildCacheChannel(err, tableNames) { if ( err ) throw err;