filmov
tv
How to use a NestJS Auth Guard to simplify your code
Показать описание
In this video, I show how the implementation of a NestJS Auth Guard really simplifies my code and makes writing unit tests for my API services a lot cleaner and easier.
I use the example of a user getting their own project. The guard checks if a user has access to a project before making any further requests, thus simplifying the code and reducing the need for repeated checks within the CRUD methods.
I use the example of a user getting their own project. The guard checks if a user has access to a project before making any further requests, thus simplifying the code and reducing the need for repeated checks within the CRUD methods.