mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
1.3 KiB
JavaScript
25 lines
1.3 KiB
JavaScript
/***********************************************************************************************************************************************************************
|
|
* File Name: lessons.routes.js (client)
|
|
* Type of Program: Router
|
|
* Description: Standalone Lesson consumption — each Lesson runs independently.
|
|
*
|
|
* GET /client/lessons → learner-facing lesson library
|
|
* GET /client/lessons/:uuid → lesson with full block content
|
|
* POST /client/lessons/:uuid/progress → standalone reading progress
|
|
* (course NULL; body.unit_uuid optional)
|
|
*
|
|
* 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.getLessons);
|
|
router.get('/:uuid', ctrl.getLessonByUuid);
|
|
router.post('/:uuid/progress', ctrl.upsertStandaloneLessonProgress);
|
|
router.post('/:uuid/watch-progress', ctrl.upsertStandaloneWatchProgress);
|
|
router.post('/:uuid/mark-complete', ctrl.markStandaloneLessonComplete);
|
|
|
|
module.exports = router;
|