From c8bebc166a6c959c832736366f6c400295a67978 Mon Sep 17 00:00:00 2001 From: Benjamin Frost Date: Mon, 6 May 2024 23:48:08 +0200 Subject: [PATCH] chore: small improvements --- src/posts/posts.controller.ts | 1 - src/users/users.controller.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts index bf63dff..1402d15 100644 --- a/src/posts/posts.controller.ts +++ b/src/posts/posts.controller.ts @@ -41,7 +41,6 @@ export class PostsController { @UploadedFile( new ParseFilePipe({ validators: [new FileTypeValidator({ fileType: 'image/*' })], - fileIsRequired: false, }), ) file: Express.Multer.File, diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts index 2ec43c6..722c1c5 100644 --- a/src/users/users.controller.ts +++ b/src/users/users.controller.ts @@ -49,7 +49,7 @@ export class UsersController { fileIsRequired: false, }), ) - file: Express.Multer.File, + file?: Express.Multer.File, ) { if (user.sub !== +id) throw new ForbiddenException();