Stage 1.5: categories, enrollment expiry, access log, bulk grant, user page
This commit is contained in:
@@ -44,10 +44,11 @@ export async function updateCourse(courseId: string, formData: FormData) {
|
||||
const description = (formData.get("description") as string) || null;
|
||||
const published = formData.get("published") === "true";
|
||||
const coverImage = (formData.get("coverImage") as string) || null;
|
||||
const categoryId = (formData.get("categoryId") as string) || null;
|
||||
|
||||
await prisma.course.update({
|
||||
where: { id: courseId },
|
||||
data: { title, slug, description, published, coverImage },
|
||||
data: { title, slug, description, published, coverImage, categoryId },
|
||||
});
|
||||
|
||||
revalidatePath("/admin/courses");
|
||||
|
||||
Reference in New Issue
Block a user