"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AnalyticsRouter = void 0; var _PromiseRouter = _interopRequireDefault(require("../PromiseRouter")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } // AnalyticsRouter.js function appOpened(req) { const analyticsController = req.config.analyticsController; return analyticsController.appOpened(req); } function trackEvent(req) { const analyticsController = req.config.analyticsController; return analyticsController.trackEvent(req); } class AnalyticsRouter extends _PromiseRouter.default { mountRoutes() { this.route('POST', '/events/AppOpened', appOpened); this.route('POST', '/events/:eventName', trackEvent); } } exports.AnalyticsRouter = AnalyticsRouter; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfUHJvbWlzZVJvdXRlciIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiZSIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiYXBwT3BlbmVkIiwicmVxIiwiYW5hbHl0aWNzQ29udHJvbGxlciIsImNvbmZpZyIsInRyYWNrRXZlbnQiLCJBbmFseXRpY3NSb3V0ZXIiLCJQcm9taXNlUm91dGVyIiwibW91bnRSb3V0ZXMiLCJyb3V0ZSIsImV4cG9ydHMiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvUm91dGVycy9BbmFseXRpY3NSb3V0ZXIuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQW5hbHl0aWNzUm91dGVyLmpzXG5pbXBvcnQgUHJvbWlzZVJvdXRlciBmcm9tICcuLi9Qcm9taXNlUm91dGVyJztcblxuZnVuY3Rpb24gYXBwT3BlbmVkKHJlcSkge1xuICBjb25zdCBhbmFseXRpY3NDb250cm9sbGVyID0gcmVxLmNvbmZpZy5hbmFseXRpY3NDb250cm9sbGVyO1xuICByZXR1cm4gYW5hbHl0aWNzQ29udHJvbGxlci5hcHBPcGVuZWQocmVxKTtcbn1cblxuZnVuY3Rpb24gdHJhY2tFdmVudChyZXEpIHtcbiAgY29uc3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