feat: protecting endpoint by roles

This commit is contained in:
Abdalhamid Alhamad
2024-12-10 10:11:47 +03:00
parent 577f91b796
commit 66e1bb0f28
7 changed files with 53 additions and 10 deletions

View File

@ -6,7 +6,7 @@ import { IS_PUBLIC_KEY } from '../decorators';
@Injectable()
export class AccessTokenGuard extends AuthGuard('access-token') {
constructor(private reflector: Reflector) {
constructor(protected reflector: Reflector) {
super();
}
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean> {