@gabliam/web-core
Version:
Gabliam plugin for add web-core
15 lines (14 loc) • 910 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomMethod = exports.Delete = exports.Head = exports.Patch = exports.Put = exports.Post = exports.Get = exports.All = void 0;
const core_1 = require("@gabliam/core");
const constants_1 = require("../constants");
const makeWebMethodDecorator = (method) => (0, core_1.makePropDecorator)(constants_1.METADATA_KEY.controllerMethod, (path) => ({ path, method }));
exports.All = makeWebMethodDecorator('all');
exports.Get = makeWebMethodDecorator('get');
exports.Post = makeWebMethodDecorator('post');
exports.Put = makeWebMethodDecorator('put');
exports.Patch = makeWebMethodDecorator('patch');
exports.Head = makeWebMethodDecorator('head');
exports.Delete = makeWebMethodDecorator('delete');
exports.CustomMethod = (0, core_1.makePropDecorator)(constants_1.METADATA_KEY.controllerMethod, (method, path) => ({ path, method }));