Style fixes

This commit is contained in:
Raul Ochoa 2014-07-30 13:45:53 +02:00
parent 67df6a4d73
commit 75088c89d3
2 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,7 @@
var _ = require('underscore')
, Step = require('step')
, Windshaft = require('windshaft')
, redisPool = new require('redis-mpool')(global.environment.redis)
, redisPool = require('redis-mpool')(global.environment.redis)
// TODO: instanciate cartoData with redisPool
, cartoData = require('cartodb-redis')(global.environment.redis)
, SignedMaps = require('./signed_maps.js')

View File

@ -211,7 +211,7 @@ module.exports = function(){
var hash = crypto.createHash('md5');
hash.update(data);
return hash.digest('hex');
}
};
me.generateCacheChannel = function(app, req, callback){
@ -241,7 +241,6 @@ module.exports = function(){
// See http://github.com/CartoDB/Windshaft-cartodb/issues/152
if ( ! app.mapStore ) {
throw new Error('missing channel cache for token ' + req.params.token);
return;
}
var next = this;
var mapStore = app.mapStore;
@ -397,7 +396,7 @@ module.exports = function(){
err = errors.length ? new Error(errors.join('\n')) : null;
callback(err);
}
}
};
// include in layergroup response the variables in serverMedata
// those variables are useful to send to the client information
@ -490,7 +489,7 @@ module.exports = function(){
return;
}
return mat[1];
}
};
// Set db authentication parameters to those of the given username
//
@ -742,7 +741,7 @@ module.exports = function(){
//console.log("type of req.query.lzma is " + typeof(req.query.lzma));
// Decode (from base64)
var lzma = (new Buffer(req.query.lzma, 'base64').toString('binary')).split('').map(function(c) { return c.charCodeAt(0) - 128 })
var lzma = (new Buffer(req.query.lzma, 'base64').toString('binary')).split('').map(function(c) { return c.charCodeAt(0) - 128 });
// Decompress
LZMA.decompress(
@ -750,8 +749,8 @@ module.exports = function(){
function(result) {
if (req.profiler) req.profiler.done('LZMA decompress');
try {
delete req.query.lzma
_.extend(req.query, JSON.parse(result))
delete req.query.lzma;
_.extend(req.query, JSON.parse(result));
me.req2params(req, callback);
} catch (err) {
callback(new Error('Error parsing lzma as JSON: ' + err));
@ -783,7 +782,7 @@ module.exports = function(){
req.params.signer = tksplit.shift();
if ( ! req.params.signer ) req.params.signer = user;
else if ( req.params.signer != user ) {
var err = new Error('Cannot use map signature of user "' + req.params.signer + '" on database of user "' + user + '"')
var err = new Error('Cannot use map signature of user "' + req.params.signer + '" on database of user "' + user + '"');
err.http_status = 403;
callback(err);
return;