firstapp / utils /catchAsync.js
Beshoy-mounir's picture
Upload 15 files
29a937c verified
Raw History Blame Contribute Delete
119 Bytes
module.exports = (fn) => {
return (req, res, next) => {
Promise.resolve(fn(req, res, next)).catch(next);
};
};