mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
assets and tier plans revamp
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ const requirementsCtrl = require("../../controllers/admin/completion_requirement
|
||||
router.get("/", ctrl.getLessons);
|
||||
router.post("/", ctrl.createLesson);
|
||||
router.get("/flat", ctrl.getLessonsFlat);
|
||||
router.get("/by-subscription", ctrl.getLessonsBySubscription);
|
||||
router.get("/field-values", ctrl.getLessonFieldValues);
|
||||
router.delete("/bulk", ctrl.bulkArchiveLessons);
|
||||
router.delete("/bulk/permanent", ctrl.bulkPermanentlyDeleteLessons);
|
||||
|
||||
@@ -7,6 +7,16 @@ router.get ('/courses/:courseId/product', ctrl.getCourseProduct);
|
||||
router.put ('/courses/:courseId/product', ctrl.upsertCourseProduct);
|
||||
router.delete('/courses/:courseId/product', ctrl.removeCourseProduct);
|
||||
|
||||
// Product per standalone unit
|
||||
router.get ('/units/:unitId/product', ctrl.getUnitProduct);
|
||||
router.put ('/units/:unitId/product', ctrl.upsertUnitProduct);
|
||||
router.delete('/units/:unitId/product', ctrl.removeUnitProduct);
|
||||
|
||||
// Product per standalone lesson
|
||||
router.get ('/lessons/:lessonId/product', ctrl.getLessonProduct);
|
||||
router.put ('/lessons/:lessonId/product', ctrl.upsertLessonProduct);
|
||||
router.delete('/lessons/:lessonId/product', ctrl.removeLessonProduct);
|
||||
|
||||
// Categories per course
|
||||
router.get ('/courses/:courseId/categories', ctrl.getCourseCategories);
|
||||
router.post ('/courses/:courseId/categories', ctrl.syncCourseCategories);
|
||||
|
||||
@@ -18,11 +18,15 @@ router.get ('/users/:id/tiers', ctrl.getUserTiers);
|
||||
router.post ('/users/tiers/grant', ctrl.grantTier);
|
||||
router.patch ('/users/tiers/:tid/revoke', ctrl.revokeTier);
|
||||
|
||||
// ← course + impact routes before /:id
|
||||
// ← course/unit/lesson + impact routes before /:id
|
||||
router.get ('/:id/impact', ctrl.getPlanImpact);
|
||||
router.get ('/:id/permanent-delete-impact', ctrl.getPlanPermanentDeleteImpact);
|
||||
router.get ('/:id/courses', ctrl.getPlanCourses);
|
||||
router.post ('/:id/courses', ctrl.syncPlanCourses);
|
||||
router.get ('/:id/units', ctrl.getPlanUnits);
|
||||
router.post ('/:id/units', ctrl.syncPlanUnits);
|
||||
router.get ('/:id/lessons', ctrl.getPlanLessons);
|
||||
router.post ('/:id/lessons', ctrl.syncPlanLessons);
|
||||
|
||||
router.get ('/:id', ctrl.getPlan);
|
||||
router.put ('/:id', ctrl.updatePlan);
|
||||
|
||||
@@ -20,6 +20,7 @@ router.get("/", ctrl.getUnits);
|
||||
router.post("/", ctrl.createUnit);
|
||||
router.post("/full", ctrl.createUnitFull);
|
||||
router.get("/flat", ctrl.getUnitsFlat);
|
||||
router.get("/by-subscription", ctrl.getUnitsBySubscription);
|
||||
router.get("/field-values", ctrl.getUnitFieldValues);
|
||||
router.delete("/bulk", ctrl.bulkArchiveUnits);
|
||||
router.delete("/bulk/permanent", ctrl.bulkPermanentlyDeleteUnits);
|
||||
|
||||
Reference in New Issue
Block a user