Spaces:
Paused
Paused
Deploy Bot commited on
Commit ·
1dfd3dd
1
Parent(s): 20eda70
Fix_ReferenceError_In_ShowSubCategories
Browse files
src/controllers/userController.js
CHANGED
|
@@ -137,7 +137,7 @@ exports.showCategories = async (ctx) => {
|
|
| 137 |
};
|
| 138 |
|
| 139 |
// Show Subcategories (called when a parent category is clicked)
|
| 140 |
-
exports.showSubCategories = async (ctx) => {
|
| 141 |
try {
|
| 142 |
const parent = await Category.findOne({ id: parentId });
|
| 143 |
const subCats = await Category.find({ parent: parentId });
|
|
|
|
| 137 |
};
|
| 138 |
|
| 139 |
// Show Subcategories (called when a parent category is clicked)
|
| 140 |
+
exports.showSubCategories = async (ctx, parentId) => {
|
| 141 |
try {
|
| 142 |
const parent = await Category.findOne({ id: parentId });
|
| 143 |
const subCats = await Category.find({ parent: parentId });
|