This commit is contained in:
@@ -33,4 +33,11 @@ router.put('/:id', categoryController.updateCategory);
|
||||
// DELETE /api/categories/:id - Delete category
|
||||
router.delete('/:id', categoryController.deleteCategory);
|
||||
|
||||
// ============ Nested Subject Routes ============
|
||||
// POST /api/categories/:categoryId/subjects - Add subject to category
|
||||
router.post('/:categoryId/subjects', categoryController.addSubjectToCategory);
|
||||
|
||||
// DELETE /api/categories/:categoryId/subjects/:subjectId - Remove subject from category
|
||||
router.delete('/:categoryId/subjects/:subjectId', categoryController.removeSubjectFromCategory);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user