UNPKG

decorator-koa-router

Version:

Package to declare koa controllers via decorators

20 lines 759 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.httpPut = void 0; const ControllerActions_1 = require("../ControllerActions"); function httpPut(route, ...middleware) { return function (object, methodName) { if (!ControllerActions_1.ControllerActions[object.constructor.name]) { ControllerActions_1.ControllerActions[object.constructor.name] = []; } const definition = { type: ControllerActions_1.HTTP_METHODS_SUPPORTED.PUT, route, method: methodName, middleware, }; ControllerActions_1.ControllerActions[object.constructor.name].push(definition); }; } exports.httpPut = httpPut; //# sourceMappingURL=httpPut.js.map