diff --git a/components/transaction/transactionController.js b/components/transaction/transactionController.js index afc9278..301fc9e 100644 --- a/components/transaction/transactionController.js +++ b/components/transaction/transactionController.js @@ -38,3 +38,12 @@ exports.updateTransaction = catchAsync(async (req, res, next) => { data: transaction, }) }) + +exports.deleteTransaction = catchAsync(async (req, res, next) => { + await transactionService.deleteTransaction(req.params.transactionId) + + res.status(204).json({ + status: 'success', + data: null, + }) +})