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