From 2ec36f32a8c223ecdafa86019e96f2643aee4428 Mon Sep 17 00:00:00 2001 From: ditiqi Date: Sun, 23 Feb 2025 21:41:17 +0800 Subject: [PATCH] add --- apps/server/src/models/post/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/server/src/models/post/utils.ts b/apps/server/src/models/post/utils.ts index 9185a0f..20bbe59 100755 --- a/apps/server/src/models/post/utils.ts +++ b/apps/server/src/models/post/utils.ts @@ -156,6 +156,7 @@ export async function setCourseInfo({ data }: { data: Post }) { sections.map((section) => section.id).includes(descendant.parentId) ); }); + sections.forEach((section) => { section.lectures = lectures.filter( (lecture) => lecture.parentId === section.id,