n8n
Version:
n8n Workflow Automation Tool
15 lines • 767 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Licensed = void 0;
const constants_1 = require("./constants");
const Licensed = (features) => {
return (target, handlerName) => {
var _a;
const controllerClass = handlerName ? target.constructor : target;
const license = ((_a = Reflect.getMetadata(constants_1.CONTROLLER_LICENSE_FEATURES, controllerClass)) !== null && _a !== void 0 ? _a : {});
license[handlerName !== null && handlerName !== void 0 ? handlerName : '*'] = Array.isArray(features) ? features : [features];
Reflect.defineMetadata(constants_1.CONTROLLER_LICENSE_FEATURES, license, controllerClass);
};
};
exports.Licensed = Licensed;
//# sourceMappingURL=Licensed.js.map
;