Skip to content

Commit

Permalink
fix: chapter display order
Browse files Browse the repository at this point in the history
  • Loading branch information
wielopolski committed Dec 19, 2024
1 parent dc9d391 commit a536fc2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/api/src/seed/seed-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export async function createNiceCourses(
isFreemium: chapterData.isFreemium,
createdAt: createdAt,
updatedAt: createdAt,
displayOrder: chapterData.displayOrder,
lessonCount: chapterData.lessons.length,
})
.returning();
Expand All @@ -88,14 +89,14 @@ export async function createNiceCourses(
title: lessonData.title,
description: lessonData.description,
type: lessonData.type,
displayOrder: index,
displayOrder: index + 1,
fileS3Key: getFileUrl(lessonData.type),
fileType:
lessonData.type === LESSON_TYPES.presentation
? "pptx"
: lessonData.type === LESSON_TYPES.video
? "mp4"
: null,
? "mp4"
: null,
chapterId: chapter.id,
createdAt: createdAt,
updatedAt: createdAt,
Expand Down

0 comments on commit a536fc2

Please sign in to comment.