Revert "Deprecate API v2" (#7801)

This commit is contained in:
Matteo Pagliazzi
2016-07-17 18:15:25 +02:00
committed by GitHub
parent 45c31a2bcf
commit 590adb3438
193 changed files with 11487 additions and 230 deletions

View File

@@ -1,23 +0,0 @@
import nconf from 'nconf';
import {
track,
trackPurchase,
mockAnalyticsService,
} from '../libs/analyticsService';
let service;
if (nconf.get('IS_PROD')) {
service = {
track,
trackPurchase,
};
} else {
service = mockAnalyticsService;
}
module.exports = function attachAnalytics (req, res, next) {
res.analytics = service;
next();
};