U
All checks were successful
Deploy to Production / deploy (push) Successful in 20s

This commit is contained in:
silverpro89
2026-02-27 20:10:15 +07:00
parent 6287a019e3
commit f96833a7e4
10 changed files with 37 additions and 58 deletions

View File

@@ -21,9 +21,6 @@ router.get('/code/:code', categoryController.getCategoryByCode);
// GET /api/categories/:id - Get category by ID
router.get('/:id', categoryController.getCategoryById);
// GET /api/categories/:id/subjects - Get subjects by category
router.get('/:id/subjects', categoryController.getSubjectsByCategory);
// POST /api/categories - Create new category
router.post('/', categoryController.createCategory);
@@ -34,6 +31,9 @@ router.put('/:id', categoryController.updateCategory);
router.delete('/:id', categoryController.deleteCategory);
// ============ Nested Subject Routes ============
// GET /api/categories/:id/subjects - Get subjects by category
router.get('/:id/subjects', categoryController.getSubjectsByCategory);
// POST /api/categories/:categoryId/subjects - Add subject to category
router.post('/:categoryId/subjects', categoryController.addSubjectToCategory);