mnubo-sdk
Version:
mnubo SmartObjects JavaScript client
20 lines • 628 B
JavaScript
;
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