-
Notifications
You must be signed in to change notification settings - Fork 0
Home
FloudMe edited this page Mar 5, 2022
·
7 revisions
Welcome to the stream-video-app-backend wiki!
- nest g mo auth - tworzy auth.module.ts w folderze auth i updatuje app.module.ts
- nest g s aut/services/auth --no-spec --flat - tworzy auth.service.ts w folderze auth/services i updatuje app.module.ts
- nest g co auth/controllers/auth --no-spec --flat - tworzy auth.controller.ts w folderze auth/controllers i updatuje app.module.ts
- nest g gu auth/guards/jws --no-spec --flat - tworzy jws.guard.ts w folderze auth/guards
- nest g d auth/decorators/roles --flat --no-spec - tworzy roles.decorator.ts w auth/decorators
- nest g gu auth/guards/roles --flat --no-spec - tworzy roles.guard.ts w folderze auth/guards
Code base on:
- Auth: https://www.youtube.com/watch?v=QlOdVxm5Zfs
- Decorator @Roles: https://www.youtube.com/watch?v=yZWcd77l9jk
- How to use decorator? In controller, above function add
@Roles(Role.*)
and@UseGuards(RolesGuard)