Files
complete-node-bootcamp/4-natours/after-section-11/utils/catchAsync.js
Jonas Schmedtmann 7f81af0ddf Initial commit 🚀
2019-06-13 15:43:15 +01:00

6 lines
100 B
JavaScript

module.exports = fn => {
return (req, res, next) => {
fn(req, res, next).catch(next);
};
};