diff --git a/components/category/categoryController.js b/components/category/categoryController.js index 3ad1278..dc7874b 100644 --- a/components/category/categoryController.js +++ b/components/category/categoryController.js @@ -30,3 +30,12 @@ exports.getCategory = catchAsync(async (req, res, next) => { data: category, }) }) + +exports.updateCategory = catchAsync(async (req, res, next) => { + const category = await categoryService.updateCategory(req.params.categoryId, req.body) + + res.status(200).json({ + status: 'success', + data: category, + }) +})