Skip to content

Commit

Permalink
fix: remove hidden field from reading dto (#356)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Rossiaud <floross@users.noreply.github.com>
  • Loading branch information
kilalo and floross committed Jan 7, 2022
1 parent 72346a2 commit 4f2a629
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import {
<<endif>>

export class <<Model pascal>>CountQueryDto {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>

<<if field boolean>>
@IsBoolean(<<=listModifier(field)>>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import {
} from '@tractr/common';

export class <<Model pascal>>FindManyQueryDto {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>
<<if field boolean>>
@IsBoolean(<<=listModifier(field)>>)
@TransformStringToBoolean()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { <<Model pascal>>CountQueryDto } from '../../dtos';

import {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>
<<if field not entity>>
mock<<Model pascal>><<field pascal>>Factory,
<<elseif field oneOne or oneMany>>
Expand All @@ -16,7 +16,7 @@ export function mock<<Model pascal>>CountQueryDtoFactory(
override: Partial<<<Model pascal>>CountQueryDto> = {}
): Required< <<Model pascal>>CountQueryDto> {
return {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>
<<if field not entity>>
<<field camel>>: mock<<Model pascal>><<field pascal>>Factory(),
<<elseif field oneOne or oneMany>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { <<Model pascal>>FindManyQueryDto } from '../../dtos';

import {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>
<<if field not entity>>
mock<<Model pascal>><<field pascal>>Factory,
<<elseif field oneOne or oneMany>>
Expand All @@ -16,7 +16,7 @@ export function mock<<Model pascal>>FindManyQueryDtoFactory(
override: Partial<<<Model pascal>>FindManyQueryDto> = {}
): Required< <<Model pascal>>FindManyQueryDto> {
return {
<<for Fields searchable and not password field>>
<<for Fields searchable and not password and not hidden field>>
<<if field not entity>>
<<field camel>>: mock<<Model pascal>><<field pascal>>Factory(),
<<elseif field oneOne or oneMany>>
Expand Down

0 comments on commit 4f2a629

Please sign in to comment.