mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-25 03:03:03 +03:00
8 lines
166 B
JavaScript
8 lines
166 B
JavaScript
function asyncWrapper(foo) {
|
|
return function (req, res, next) {
|
|
return Promise.resolve(foo(req, res, next)).catch(next);
|
|
};
|
|
}
|
|
|
|
module.exports = asyncWrapper;
|