routing-controllers
Version:
Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.
20 lines • 593 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Post = Post;
const index_1 = require("../index");
/**
* Registers an action to be executed when POST request comes on a given route.
* Must be applied on a controller action.
*/
function Post(route, options) {
return function (object, methodName) {
(0, index_1.getMetadataArgsStorage)().actions.push({
type: 'post',
target: object.constructor,
method: methodName,
options,
route,
});
};
}
//# sourceMappingURL=Post.js.map
;