import { getOrSetControllerId } from "../metadata/controller.ts";import { getMetadataArgsStorage } from "../mod.ts";import { RequestMethod } from "../types/request-method.ts";import { ClassMethodDecoratorContext } from "./decorator.models.ts";
export function Put(route?: RegExp): Function;
export function Put(route?: string): Function;
export function Put(route?: string | RegExp): Function { return function (fn: Function, context: ClassMethodDecoratorContext) { const controllerId = getOrSetControllerId(context);
getMetadataArgsStorage().actions.push({ type: RequestMethod.Put, object: fn, target: fn, method: context.name as string, route: route, controllerId: controllerId, }); };}