diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-14 15:33:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-14 16:03:09 +0100 |
commit | e3a682a877a10833cb54ac3595e55110bda95647 (patch) | |
tree | 4c9e2e31be234720a72988f2e9ad8f4a002ec4c8 /server/middlewares/async.ts | |
parent | a0922eb9b3750ab6de31116531b625643930b38c (diff) | |
download | PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.gz PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.zst PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.zip |
Handle thumbnail update
Diffstat (limited to 'server/middlewares/async.ts')
-rw-r--r-- | server/middlewares/async.ts | 4 |
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 | ||