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