12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = exports.AnalyticsController = void 0;
- var _AdaptableController = _interopRequireDefault(require("./AdaptableController"));
- var _AnalyticsAdapter = require("../Adapters/Analytics/AnalyticsAdapter");
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
- class AnalyticsController extends _AdaptableController.default {
- appOpened(req) {
- return Promise.resolve().then(() => {
- return this.adapter.appOpened(req.body, req);
- }).then(response => {
- return {
- response: response || {}
- };
- }).catch(() => {
- return {
- response: {}
- };
- });
- }
- trackEvent(req) {
- return Promise.resolve().then(() => {
- return this.adapter.trackEvent(req.params.eventName, req.body, req);
- }).then(response => {
- return {
- response: response || {}
- };
- }).catch(() => {
- return {
- response: {}
- };
- });
- }
- expectedAdapterType() {
- return _AnalyticsAdapter.AnalyticsAdapter;
- }
- }
- exports.AnalyticsController = AnalyticsController;
- var _default = exports.default = AnalyticsController;
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfQWRhcHRhYmxlQ29udHJvbGxlciIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX0FuYWx5dGljc0FkYXB0ZXIiLCJlIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJBbmFseXRpY3NDb250cm9sbGVyIiwiQWRhcHRhYmxlQ29udHJvbGxlciIsImFwcE9wZW5lZCIsInJlcSIsIlByb21pc2UiLCJyZXNvbHZlIiwidGhlbiIsImFkYXB0ZXIiLCJib2R5IiwicmVzcG9uc2UiLCJjYXRjaCIsInRyYWNrRXZlbnQiLCJwYXJhbXMiLCJldmVudE5hbWUiLCJleHBlY3RlZEFkYXB0ZXJUeXBlIiwiQW5hbHl0aWNzQWRhcHRlciIsImV4cG9ydHMiLCJfZGVmYXVsdCJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db250cm9sbGVycy9B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