update
This commit is contained in:
36
routes/chapterLessonRoutes.js
Normal file
36
routes/chapterLessonRoutes.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const lessonController = require('../controllers/lessonController');
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* tags:
|
||||
* name: Chapter Lessons
|
||||
* description: Quản lý bài học theo chương
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/chapters/{chapter_id}/lessons:
|
||||
* get:
|
||||
* tags: [Chapter Lessons]
|
||||
* summary: Lấy danh sách bài học của chương
|
||||
* parameters:
|
||||
* - in: path
|
||||
* name: chapter_id
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* format: uuid
|
||||
* - in: query
|
||||
* name: include_unpublished
|
||||
* schema:
|
||||
* type: boolean
|
||||
* default: false
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Danh sách bài học
|
||||
*/
|
||||
router.get('/:chapter_id/lessons', lessonController.getLessonsByChapter);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user