NestJS · Middle · Question 10 of 75

How do you combine several decorators into one, e.g. guards plus Swagger annotations?

Explanation

A single @Auth('admin') decorator can set roles metadata, apply guards and document the route.

Further reading

Problem with a question

NestJS · Middle · question 10

Test yourself

Take the NestJS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz