mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
WIP Items module.
This commit is contained in:
9
server/src/http/middleware/asyncMiddleware.js
Normal file
9
server/src/http/middleware/asyncMiddleware.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const asyncMiddleware = (fn) => (req, res, next) => {
|
||||
Promise.resolve(fn(req, res, next))
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
next(error);
|
||||
});
|
||||
};
|
||||
|
||||
export default asyncMiddleware;
|
||||
Reference in New Issue
Block a user