NestJS - Guards
Identify the error in this NestJS controller snippet using multiple guards:
@UseGuards(AuthGuard RolesGuard)
@Get('data')
getData() {
return 'Data';
}
Identify the error in this NestJS controller snippet using multiple guards:
@UseGuards(AuthGuard RolesGuard)
@Get('data')
getData() {
return 'Data';
}
@UseGuards() must be separated by commas.AuthGuard and RolesGuard, causing a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions