mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
units,lesson as standalone
This commit is contained in:
@@ -14,6 +14,7 @@ router.get('/uuid/:uuid', ctrl.getCourseByUuid);
|
||||
router.get('/unit/uuid/:uuid/lessons', ctrl.getLessonsByUnitUuid);
|
||||
router.get('/unit/uuid/:uuid', ctrl.getUnitByUuid);
|
||||
router.get('/lesson/uuid/:uuid', ctrl.getLessonByUuid);
|
||||
router.get('/quiz/uuid/:uuid', ctrl.getQuizByUuid);
|
||||
|
||||
// Courses
|
||||
router.get('/', ctrl.getCourses);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* 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)
|
||||
@@ -14,6 +15,7 @@ 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);
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
***********************************************************************************************************************************************************************/
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const { list, unseenCount, markSeen, markAllSeen, clearAll } = require('../../controllers/client/notification.controller');
|
||||
const { list, unseenCount, stickyAnnouncement, markSeen, markAllSeen, clearAll } = require('../../controllers/client/notification.controller');
|
||||
|
||||
router.get('/', list);
|
||||
router.get('/unseen', unseenCount);
|
||||
router.get('/sticky', stickyAnnouncement);
|
||||
router.patch('/seen-all', markAllSeen);
|
||||
router.patch('/:id/seen', markSeen);
|
||||
router.delete('/clear-all', clearAll);
|
||||
|
||||
Reference in New Issue
Block a user