Answers for "nestjs role guard"

3

nestjs role guard

import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs';

@Injectable()
export class RolesGuard implements CanActivate {
  canActivate(
    context: ExecutionContext,
  ): boolean | Promise<boolean> | Observable<boolean> {
    return true;
  }
}
Posted by: Guest on May-25-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language