UNPKG

@nova-ts/core

Version:

A serverside framework used to build scalable application

30 lines (28 loc) 731 B
import { ControllerRegistry } from "./chunk-A45SEU4H.js"; // src/Decorators/PostMapping.ts function PostMapping(path) { return function(target, propertyKey, descriptor) { if (!ControllerRegistry.has(target.constructor)) { ControllerRegistry.set(target.constructor, { mapping: "", routes: [] }); } const controller = ControllerRegistry.get(target.constructor); if (controller) { controller.routes.push({ method: "post" /* POST */, path, handlerName: propertyKey }); } else { console.warn(`Controller not registered for method ${propertyKey.toString()}`); } }; } export { PostMapping }; //# sourceMappingURL=chunk-BM3ACO54.js.map