using method parameters in a guard nestjs

The solution for “using method parameters in a guard nestjs” can be found here. The following code will assist you in solving the problem.

canActivate(context: ExecutionContext): boolean {
const request = context.switchToHttp().getRequest();
const params = request.params;
const id = params.id; // automatically parsed
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in