add
This commit is contained in:
parent
5c943711a4
commit
baa65e0e3f
|
@ -163,7 +163,7 @@ export class PostService extends BaseTreeService<Prisma.PostDelegate> {
|
||||||
await this.setPerms(result, staff);
|
await this.setPerms(result, staff);
|
||||||
await setCourseInfo({ data: result });
|
await setCourseInfo({ data: result });
|
||||||
}
|
}
|
||||||
|
// console.log(result);
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -128,7 +128,7 @@ export async function updateCourseEnrollmentStats(courseId: string) {
|
||||||
|
|
||||||
export async function setCourseInfo({ data }: { data: Post }) {
|
export async function setCourseInfo({ data }: { data: Post }) {
|
||||||
// await db.term
|
// await db.term
|
||||||
|
console.log(12314243342);
|
||||||
if (data?.type === PostType.COURSE) {
|
if (data?.type === PostType.COURSE) {
|
||||||
const ancestries = await db.postAncestry.findMany({
|
const ancestries = await db.postAncestry.findMany({
|
||||||
where: {
|
where: {
|
||||||
|
@ -169,6 +169,7 @@ export async function setCourseInfo({ data }: { data: Post }) {
|
||||||
(lecture) => lecture.parentId === section.id,
|
(lecture) => lecture.parentId === section.id,
|
||||||
) as any as Lecture[];
|
) as any as Lecture[];
|
||||||
});
|
});
|
||||||
|
console.log(sections);
|
||||||
Object.assign(data, { sections, lectureCount });
|
Object.assign(data, { sections, lectureCount });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ export function CourseFormProvider({
|
||||||
delete formattedValues.sections;
|
delete formattedValues.sections;
|
||||||
delete formattedValues.deptIds;
|
delete formattedValues.deptIds;
|
||||||
|
|
||||||
console.log(course?.meta);
|
console.log(course.meta);
|
||||||
console.log(formattedValues?.meta);
|
console.log(formattedValues?.meta);
|
||||||
try {
|
try {
|
||||||
if (editId) {
|
if (editId) {
|
||||||
|
|
Loading…
Reference in New Issue