UNPKG

@10abdullahbutt/auth-module

Version:

A NestJS-style authentication module with JWT and role-based access control.

5 lines (3 loc) 157 B
import { SetMetadata } from '@nestjs/common'; export const ROLES_KEY = 'roles'; export const Roles = (...roles: string[]) => SetMetadata(ROLES_KEY, roles);