Skip to content

Commit

Permalink
chore: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyiming0803 committed Apr 2, 2022
1 parent 597bc26 commit 46c4ee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = {
// It is forbidden to read body from Req, eg: req.body
'authing-nestjs/forbid_read_body_from_req': 'warn',

// The parameter type annotation in the function must be a class
// The @Body type annotation in the function must be a class, eg: @Body() dto: ClassDto
'authing-nestjs/use_class_as_type_in_method_of_controller': 'warn',

// Each DTO field must have a class validator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { IContext, ITSInterfaceDeclaration, MethodDefinition, Pattern } from 'es
const bodyParamMap = new Map()

export const messages = {
invalidTypeAnnotation: 'The parameter type annotation in the function must be a class'
invalidTypeAnnotation:
'The @Body type annotation in the function must be a class, eg: @Body() dto: ClassDto'
}

export const useClassAsTypeInMethodOfController = {
Expand Down

0 comments on commit 46c4ee4

Please sign in to comment.