File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ async function bootstrap(): Promise<void> {
39
39
next ( ) ;
40
40
}
41
41
} ) ;
42
- app . useGlobalPipes ( new ValidationPipe ( ) ) ;
42
+ app . useGlobalPipes (
43
+ new ValidationPipe ( {
44
+ transform : true ,
45
+ } ) ,
46
+ ) ;
43
47
app . useGlobalFilters ( new HttpExceptionFilter ( new JsendFormatter ( ) ) ) ;
44
48
// TODO: Update origin as needed
45
49
app . enableCors ( { origin : '*' , credentials : true } ) ;
Original file line number Diff line number Diff line change 1
1
import { InputType , Field } from '@nestjs/graphql' ;
2
- import { IsOptional } from 'class-validator' ;
3
2
import { Stream } from 'stream' ;
4
3
import GraphQLUpload = require( 'graphql-upload/GraphQLUpload.js' ) ;
5
4
export interface FileUpload {
@@ -12,6 +11,5 @@ export interface FileUpload {
12
11
@InputType ( )
13
12
export class CreateSummaryDTO {
14
13
@Field ( ( ) => GraphQLUpload )
15
- @IsOptional ( )
16
- inputFile ?: Promise < FileUpload > ;
14
+ inputFile : Promise < FileUpload > ;
17
15
}
You can’t perform that action at this time.
0 commit comments