2026-03-03 12:36:05 +00:00

8 lines
156 B
JavaScript

const catchAsync = (func) => {
return (req, res, next) => {
func(req, res, next).catch((error) => next(error));
};
};
module.exports = catchAsync;