aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/async.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/async.ts')
-rw-r--r--server/middlewares/async.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/async.ts b/server/middlewares/async.ts
index 3a1bdabb8..3d6e38809 100644
--- a/server/middlewares/async.ts
+++ b/server/middlewares/async.ts
@@ -13,7 +13,7 @@ function asyncMiddleware (fun: RequestPromiseHandler | RequestPromiseHandler[])
13 return (req: Request, res: Response, next: NextFunction) => { 13 return (req: Request, res: Response, next: NextFunction) => {
14 if (Array.isArray(fun) === true) { 14 if (Array.isArray(fun) === true) {
15 return eachSeries(fun as RequestHandler[], (f, cb) => { 15 return eachSeries(fun as RequestHandler[], (f, cb) => {
16 Promise.resolve(f(req, res, cb)) 16 Promise.resolve(f(req, res, err => cb(err)))
17 .catch(err => next(err)) 17 .catch(err => next(err))
18 }, next) 18 }, next)
19 } 19 }