elewis-nestjs-events
v0.0.34
Published
## Overview
Downloads
7
Readme
Common security modules
Overview
!!! This is an expermental module !!!
Provides a data transformation interceptor which adds workflow elements to all elements in an array of data.
Requires that method is decorated with the WorkflowConfig decorator
Install
npm install elewis-nestjs-workflow
Types
- WorkflowTransoformationInterceptor
Usage
import { WorkflowTransformationInterceptor } from 'elewis-nestjs-workflow';
import { WorkflowTransformationInterceptor } from 'elewis-nestjs-workflow';
// etc.
@Get()
@Roles('admin')
@workflowConfig(workflow) // Need this, it's injected into WorkflowInterceptor
@UseGuards(AuthGuard, RolesGuard)
@UseInterceptors(WorkflowTransormationInterceptor)
async findAll(
@Headers('Authorization') authorzation: string,
): Promise<User[]> {
return this.usersService.findAll();
}