In a custom decorator Param I have a console.log that is run once. How to make it to return me a fresh value of id on each request like in nestjs?
@Get('/:id')
async findUser (
@Param() id: string | undefined // is not called each time when acces method findUser
): Promise<User> {
}
export const Param = () => (target: any, key: string, index: number) => {
var indices = Reflect.getMetadata('request', target, key);
console.log('test', indices)
}
Reflect.defineMetadata('request', event, currentController.prototype, route.methodName);