feat: add MongoDB search method, endpoints, and settings module
deploy-chabokan / deploy (push) Canceled after 0s
deploy-chabokan / deploy (push) Canceled after 0s
This commit is contained in:
@@ -11,7 +11,7 @@ exports.getCategoryTree = catchAsync(async (req, res, next) => {
|
||||
})
|
||||
|
||||
exports.getAllCategories = catchAsync(async (req, res, next) => {
|
||||
const categories = await categoryService.getAllCategories()
|
||||
const categories = await categoryService.getAllCategories(req.query)
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
@@ -20,6 +20,7 @@ exports.getAllCategories = catchAsync(async (req, res, next) => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
exports.createCategory = catchAsync(async (req, res, next) => {
|
||||
const category = await categoryService.createCategory(req.body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user