This commit is contained in:
@@ -25,4 +25,11 @@ router.put('/:id', chapterController.updateChapter);
|
||||
// Delete chapter
|
||||
router.delete('/:id', chapterController.deleteChapter);
|
||||
|
||||
// ============ Nested Lesson Routes ============
|
||||
// POST /api/chapters/:chapterId/lessons - Add lesson to chapter
|
||||
router.post('/:chapterId/lessons', chapterController.addLessonToChapter);
|
||||
|
||||
// DELETE /api/chapters/:chapterId/lessons/:lessonId - Remove lesson from chapter
|
||||
router.delete('/:chapterId/lessons/:lessonId', chapterController.removeLessonFromChapter);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user