From 9b311bda276ef33f5047ec1299fcf1d1802e90de Mon Sep 17 00:00:00 2001 From: 1M4nt0 Date: Mon, 16 Oct 2023 14:27:27 +0200 Subject: [PATCH] fix: fix empty media-channell error in create course --- apps/web/pages/api/v0/course/metadata.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/web/pages/api/v0/course/metadata.ts b/apps/web/pages/api/v0/course/metadata.ts index da68757..ee24752 100644 --- a/apps/web/pages/api/v0/course/metadata.ts +++ b/apps/web/pages/api/v0/course/metadata.ts @@ -25,14 +25,7 @@ const handlePostRequest = async ( const [mediaChannel] = fields['media-channel'] as string[] const [imageFile] = files.file as formidable.File[] - if ( - !name || - !description || - !website || - !snapshotEns || - !mediaChannel || - !imageFile - ) { + if (!name || !description || !website || !snapshotEns || !imageFile) { return res .status(400) .json({ status: ApiResponseStatus.error, message: 'Bad request.' })