UNPKG

@gooddata/gooddata-js

Version:
25 lines (24 loc) 908 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var BootstrapModule = /** @class */ (function () { function BootstrapModule(xhr) { this.xhr = xhr; } /** * Returns information about currently logged in user from bootstrap resource * @method getBootstrapData */ BootstrapModule.prototype.getBootstrapData = function () { return this.xhr.get("/gdc/app/account/bootstrap").then(function (result) { return result.getData(); }); }; /** * Returns the mapboxToken for using GeoPushpinChart * @method getMapboxToken * @param {any} bootstrapData - data from bootstrap resource */ BootstrapModule.prototype.getMapboxToken = function (bootstrapData) { return bootstrapData.bootstrapResource.current.mapboxToken || null; }; return BootstrapModule; }()); exports.BootstrapModule = BootstrapModule;