zents
Version:
ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.
23 lines • 854 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResponseContextAction = void 0;
const AbstractAction_1 = require("./AbstractAction");
const types_1 = require("../../types");
class ResponseContextAction extends AbstractAction_1.AbstractAction {
constructor(injector, context) {
super(injector);
this.context = context;
}
run(instance, method) {
if (!Reflect.hasMetadata(types_1.REFLECT_METADATA.CONTEXT_RESPONSE, instance, method)) {
return;
}
const metadata = Reflect.getMetadata(types_1.REFLECT_METADATA.CONTEXT_RESPONSE, instance, method);
return {
index: metadata,
value: this.context.response,
};
}
}
exports.ResponseContextAction = ResponseContextAction;
//# sourceMappingURL=ResponseContextAction.js.map