protech
This commit is contained in:
parent
5c2b5d55aa
commit
dcf0385a87
1 changed files with 4 additions and 0 deletions
|
|
@ -182,6 +182,10 @@ export class ChaptersLessonService {
|
||||||
if (!currentChapter) {
|
if (!currentChapter) {
|
||||||
throw new NotFoundError('Chapter not found');
|
throw new NotFoundError('Chapter not found');
|
||||||
}
|
}
|
||||||
|
// Validate chapter belongs to the specified course
|
||||||
|
if (currentChapter.course_id !== course_id) {
|
||||||
|
throw new NotFoundError('Chapter not found in this course');
|
||||||
|
}
|
||||||
const oldSortOrder = currentChapter.sort_order;
|
const oldSortOrder = currentChapter.sort_order;
|
||||||
|
|
||||||
// If same position, no need to reorder
|
// If same position, no need to reorder
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue