@@ -20,28 +20,26 @@ export class QueryDtoFactory<Entity> extends AbstractFactory<QueryDto<Entity>> {
20
20
const commonDecorators = [ IsOptional ( ) ] ;
21
21
const numericDecorators = [ IsNumber ( ) , Type ( ) , Min ( 1 ) ] ;
22
22
23
- this . defineTypeMetadata ( "limit" , Number ) ;
24
- this . applyPropertyDecorators (
25
- "limit" ,
26
- ...commonDecorators ,
27
- ...numericDecorators ,
28
- ...( options . limit ?. max ? [ Max ( options . limit . max ) ] : [ ] )
29
- ) ;
30
-
31
- this . defineTypeMetadata ( "offset" , Number ) ;
32
- this . applyPropertyDecorators (
33
- "offset" ,
34
- ...commonDecorators ,
35
- ...numericDecorators ,
36
- ...( options . offset ?. max ? [ Max ( options . offset . max ) ] : [ ] )
37
- ) ;
38
-
39
- this . defineTypeMetadata ( "expand" , Array ) ;
40
- this . applyPropertyDecorators (
41
- "expand" ,
42
- ...commonDecorators ,
43
- Type ( ( type ) => String ) ,
44
- IsIn ( options . expand ?. in ?? [ ] , { each : true } )
45
- ) ;
23
+ this . defineTypeMetadata ( "limit" , Number )
24
+ . applyPropertyDecorators (
25
+ "limit" ,
26
+ ...commonDecorators ,
27
+ ...numericDecorators ,
28
+ ...( options . limit ?. max ? [ Max ( options . limit . max ) ] : [ ] )
29
+ )
30
+ . defineTypeMetadata ( "offset" , Number )
31
+ . applyPropertyDecorators (
32
+ "offset" ,
33
+ ...commonDecorators ,
34
+ ...numericDecorators ,
35
+ ...( options . offset ?. max ? [ Max ( options . offset . max ) ] : [ ] )
36
+ )
37
+ . defineTypeMetadata ( "expand" , Array )
38
+ . applyPropertyDecorators (
39
+ "expand" ,
40
+ ...commonDecorators ,
41
+ Type ( ( type ) => String ) ,
42
+ IsIn ( options . expand ?. in ?? [ ] , { each : true } )
43
+ ) ;
46
44
}
47
45
}
0 commit comments