Centralize common headers, this will help up to move biz metrics out of the process
This commit is contained in:
@@ -5,11 +5,6 @@ module.exports = function incrementMapViewCount (metadataBackend) {
|
||||
const { mapConfig, user, logger } = res.locals;
|
||||
const statTag = mapConfig.obj().stat_tag;
|
||||
|
||||
if (statTag) {
|
||||
res.set('Carto-Stat-Tag', `${statTag}`);
|
||||
}
|
||||
|
||||
// Error won't blow up, just be logged.
|
||||
metadataBackend.incMapviewCount(user, statTag, (err) => {
|
||||
if (err) {
|
||||
err.message = `Failed to increment mapview count for user '${user}'. ${err.message}`;
|
||||
|
||||
Reference in New Issue
Block a user