Reverts calling next() after handling response (#2634)
* Revert "Makes sure routes don't overlap and yield a header set error" * removes next() calls in PromiseRouter * Reverts calling next() after response * Adds fail calls when next() calls traverse tests
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
// 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);
|
||||
@@ -9,6 +14,7 @@ function trackEvent(req) {
|
||||
|
||||
export class AnalyticsRouter extends PromiseRouter {
|
||||
mountRoutes() {
|
||||
this.route('POST','/events/AppOpened', appOpened);
|
||||
this.route('POST','/events/:eventName', trackEvent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user