No need to retrieve api key externally, QueryTablesApi takes care
This commit is contained in:
parent
742a9744ea
commit
75c4153f9b
@ -197,31 +197,8 @@ module.exports = function(redisPool) {
|
|||||||
}
|
}
|
||||||
return [req.params.table];
|
return [req.params.table];
|
||||||
}
|
}
|
||||||
var user, key;
|
|
||||||
var next = this;
|
queryTablesApi.getAffectedTablesInQuery(that.userByReq(req), sql, this); // in addCacheChannel
|
||||||
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);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
function buildCacheChannel(err, tableNames) {
|
function buildCacheChannel(err, tableNames) {
|
||||||
if ( err ) throw err;
|
if ( err ) throw err;
|
||||||
|
Loading…
Reference in New Issue
Block a user