chore: relocate backend into apps/api ahead of monorepo merge

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 12:20:40 +08:00
co-authored by Claude Sonnet 5
parent af44598df6
commit eaa6d2276a
388 changed files with 0 additions and 13998 deletions
+26
View File
@@ -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;