Makes sure routes don't overlap and yield a header set error (#2559)

This commit is contained in:
Florent Vilmart
2016-08-21 13:57:12 -04:00
committed by GitHub
parent 9ab488b6a0
commit 23e47f2e28
4 changed files with 13 additions and 9 deletions

View File

@@ -1,11 +1,6 @@
// AnalyticsRouter.js
import PromiseRouter from '../PromiseRouter';
function appOpened(req) {
const analyticsController = req.config.analyticsController;
return analyticsController.appOpened(req);
}
function trackEvent(req) {
const analyticsController = req.config.analyticsController;
return analyticsController.trackEvent(req);
@@ -14,7 +9,6 @@ function trackEvent(req) {
export class AnalyticsRouter extends PromiseRouter {
mountRoutes() {
this.route('POST','/events/AppOpened', appOpened);
this.route('POST','/events/:eventName', trackEvent);
}
}