n8n
Version:
n8n Workflow Automation Tool
13 lines • 633 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Middleware = void 0;
const constants_1 = require("./constants");
const Middleware = () => (target, handlerName) => {
var _a;
const controllerClass = target.constructor;
const middlewares = ((_a = Reflect.getMetadata(constants_1.CONTROLLER_MIDDLEWARES, controllerClass)) !== null && _a !== void 0 ? _a : []);
middlewares.push({ handlerName: String(handlerName) });
Reflect.defineMetadata(constants_1.CONTROLLER_MIDDLEWARES, middlewares, controllerClass);
};
exports.Middleware = Middleware;
//# sourceMappingURL=Middleware.js.map
;