Rename callback
This commit is contained in:
parent
c8c22a787e
commit
64329c3fac
@ -47,14 +47,14 @@ MapConfigOverviewsAdapter.prototype.getMapConfig = function (user, requestMapCon
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function augmentLayer(overviewsMetadataBackend, filterStatsBackend, user, layer, analysesResults, done) {
|
function augmentLayer(overviewsMetadataBackend, filterStatsBackend, user, layer, analysesResults, callback) {
|
||||||
if (layer.type !== 'mapnik' && layer.type !== 'cartodb') {
|
if (layer.type !== 'mapnik' && layer.type !== 'cartodb') {
|
||||||
return done(null, layer);
|
return callback(null, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
overviewsMetadataBackend.getOverviewsMetadata(user, layer.options.sql, function (err, metadata) {
|
overviewsMetadataBackend.getOverviewsMetadata(user, layer.options.sql, function (err, metadata) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return done(err, layer);
|
return callback(err, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
var queryRewriteData = { overviews: metadata };
|
var queryRewriteData = { overviews: metadata };
|
||||||
@ -74,14 +74,14 @@ function augmentLayer(overviewsMetadataBackend, filterStatsBackend, user, layer,
|
|||||||
layer.options = Object.assign({}, layer.options, { queryRewriteData });
|
layer.options = Object.assign({}, layer.options, { queryRewriteData });
|
||||||
}
|
}
|
||||||
|
|
||||||
return done(null, layer);
|
return callback(null, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
var unfilteredQuery = queryRewriteData.unfiltered_query;
|
var unfilteredQuery = queryRewriteData.unfiltered_query;
|
||||||
|
|
||||||
filterStatsBackend.getFilterStats(user, unfilteredQuery, filters, function (err, stats) {
|
filterStatsBackend.getFilterStats(user, unfilteredQuery, filters, function (err, stats) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return done(null, layer);
|
return callback(null, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
queryRewriteData.filter_stats = stats;
|
queryRewriteData.filter_stats = stats;
|
||||||
@ -91,7 +91,7 @@ function augmentLayer(overviewsMetadataBackend, filterStatsBackend, user, layer,
|
|||||||
layer.options = Object.assign({}, layer.options, { queryRewriteData });
|
layer.options = Object.assign({}, layer.options, { queryRewriteData });
|
||||||
}
|
}
|
||||||
|
|
||||||
return done(null, layer);
|
return callback(null, layer);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user