5 lines
126 B
JavaScript
5 lines
126 B
JavaScript
|
const asyncHandler = fn => (req, res, next) =>
|
||
|
Promise.resolve(fn(req, res, next)).catch(next)
|
||
|
|
||
|
export default asyncHandler
|