Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

using method parameters in a guard nestjs

canActivate(context: ExecutionContext): boolean {
  const request = context.switchToHttp().getRequest();
  const params = request.params;
  const id = params.id; // automatically parsed
}
 
PREVIOUS NEXT
Tagged: #method #parameters #guard #nestjs
ADD COMMENT
Topic
Name
2+9 =