refactor: extract lesson completion logic into shared markLessonComplete method and add course progress tracking to video and quiz responses

This commit is contained in:
JakkrapartXD 2026-01-29 17:17:15 +07:00
parent ab560809c7
commit 18816c4fb2
2 changed files with 129 additions and 83 deletions

View file

@ -242,6 +242,8 @@ export interface SaveVideoProgressResponse {
video_progress_percentage: number | null;
is_completed: boolean;
last_watched_at: Date;
course_progress_percentage?: number;
is_course_completed?: boolean;
};
}
@ -362,5 +364,7 @@ export interface SubmitQuizResponse {
is_correct: boolean;
score: number;
}[];
course_progress_percentage?: number;
is_course_completed?: boolean;
};
}