UNPKG

mnubo-sdk

Version:
20 lines 628 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function authenticate(target, key, descriptor) { var value = descriptor.value; descriptor.value = function () { var _this = this; var args = arguments; if (!this.client.options.token) { return this.client.authenticate().then(function () { return value.apply(_this, args); }); } else { return Promise.resolve(value.apply(this, args)); } }; return descriptor; } exports.authenticate = authenticate; //# sourceMappingURL=decorators.js.map