mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -0,0 +1,26 @@
|
||||
/***********************************************************************************************************************************************************************
|
||||
* File Name: units.routes.js (client)
|
||||
* Type of Program: Router
|
||||
* Description: Standalone Unit consumption — Units run independently of Courses.
|
||||
*
|
||||
* GET /client/units → learner-facing unit library
|
||||
* GET /client/units/:uuid → unit metadata
|
||||
* GET /client/units/:uuid/lessons → unit + ALL lesson data
|
||||
* GET /client/units/:uuid/quiz → quiz (answers stripped)
|
||||
* POST /client/units/:uuid/quiz/:quizId/submit → graded attempt (no course context)
|
||||
*
|
||||
* Author: Kenneth Obsequio (@lash0000)
|
||||
* Date Created: Jul. 7, 2026
|
||||
***********************************************************************************************************************************************************************/
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const ctrl = require('../../controllers/client/units.controller');
|
||||
|
||||
router.get('/', ctrl.getUnits);
|
||||
router.get('/:uuid/lessons', ctrl.getLessonsByUnitUuid);
|
||||
router.get('/:uuid/quiz', ctrl.getUnitQuiz);
|
||||
router.patch('/:uuid/quiz/:quizId/draft', ctrl.saveUnitQuizDraft);
|
||||
router.post('/:uuid/quiz/:quizId/submit', ctrl.submitUnitQuiz);
|
||||
router.get('/:uuid', ctrl.getUnitByUuid);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user