This commit is contained in:
Ken
2026-01-19 09:33:35 +07:00
parent 374dc12b2d
commit 70838a4bc1
103 changed files with 16929 additions and 2 deletions

28
routes/chapterRoutes.js Normal file
View File

@@ -0,0 +1,28 @@
const express = require('express');
const router = express.Router();
const chapterController = require('../controllers/chapterController');
/**
* Chapter Routes
* Base path: /api/chapters
*/
// Get all chapters
router.get('/', chapterController.getAllChapters);
// Get chapter by ID
router.get('/:id', chapterController.getChapterById);
// Get lessons in a chapter
router.get('/:id/lessons', chapterController.getLessonsByChapter);
// Create new chapter
router.post('/', chapterController.createChapter);
// Update chapter
router.put('/:id', chapterController.updateChapter);
// Delete chapter
router.delete('/:id', chapterController.deleteChapter);
module.exports = router;