This commit is contained in:
ditiqi 2025-02-24 12:57:26 +08:00
parent 8cb8de8fa9
commit 5a5d4ec3ff
4 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,11 @@ export async function setCourseInfo({ data }: { data: Post }) {
id: true,
descendant: true,
},
orderBy: {
descendant: {
order: 'asc',
},
},
});
const descendants = ancestries.map((ancestry) => ancestry.descendant);
const sections: SectionDto[] = descendants

View File

@ -37,4 +37,5 @@ export class PostQueueService implements OnModuleInit {
debounce: { id: `${QueueJobType.UPDATE_POST_STATE}_${data.id}` },
});
}
}

View File

@ -41,6 +41,9 @@ const CourseContentForm: React.FC = () => {
type: PostType.SECTION,
deletedAt: null,
},
orderBy: {
order: "asc",
},
},
{
enabled: !!editId,

View File

@ -58,6 +58,9 @@ export const LectureList: React.FC<LectureListProps> = ({
type: PostType.LECTURE,
deletedAt: null,
},
orderBy: {
order: "asc",
},
},
{
enabled: !!sectionId,