Skip to content

Commit

Permalink
fix: fix empty media-channell error in create course
Browse files Browse the repository at this point in the history
  • Loading branch information
1M4nt0 committed Oct 16, 2023
1 parent bd0b403 commit 9b311bd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions apps/web/pages/api/v0/course/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.' })
Expand Down

0 comments on commit 9b311bd

Please sign in to comment.