feat: complete platform operations roadmap
This commit is contained in:
@@ -66,7 +66,7 @@ const toCourse = (course: ApiCourse): Course => ({
|
||||
title: course.title,
|
||||
description: course.description,
|
||||
category: course.category,
|
||||
thumbnail: course.coverImageUrl || 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=800&q=80',
|
||||
thumbnail: course.coverImageUrl || '/course-placeholder.svg',
|
||||
instructor: course.instructor.name,
|
||||
status: course.status === 'draft' ? 'draft' : 'published',
|
||||
progress: course.progress,
|
||||
@@ -186,6 +186,10 @@ export const deleteCourse = async (id: string): Promise<void> => {
|
||||
await apiRequest(`/manage/courses/${id}`, { method: 'DELETE' });
|
||||
};
|
||||
|
||||
export const duplicateCourse = async (id: string): Promise<void> => {
|
||||
await apiRequest(`/manage/courses/${id}/duplicate`, { method: 'POST' });
|
||||
};
|
||||
|
||||
type ApiComment = {
|
||||
id: string;
|
||||
courseId: string;
|
||||
|
||||
Reference in New Issue
Block a user