LocChat/server/decorators/roles.decorator.ts
Joseph Ditton 84b45cd6b1 adds roles
2021-12-01 20:18:26 -07:00

6 lines
229 B
TypeScript

import { SetMetadata } from '@nestjs/common';
import { RoleKey } from 'server/entities/role.entity';
export const ROLES_CONTEXT_KEY = 'roles';
export const Roles = (...roles: RoleKey[]) => SetMetadata(ROLES_CONTEXT_KEY, roles);