ADD: get one category handler
This commit is contained in:
@@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user