diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-01 13:25:41 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-02 16:57:07 +0200 |
commit | 1cfbdd30d9913bfaa0c7e54f82e5b953646bb0d1 (patch) | |
tree | 1c3a8e3123da47e264533727f5e479edb5cda316 /server | |
parent | 76148b27f7501bac061992136852be4303370c8d (diff) | |
download | PeerTube-1cfbdd30d9913bfaa0c7e54f82e5b953646bb0d1.tar.gz PeerTube-1cfbdd30d9913bfaa0c7e54f82e5b953646bb0d1.tar.zst PeerTube-1cfbdd30d9913bfaa0c7e54f82e5b953646bb0d1.zip |
refactor deprecated body-parser usage
Diffstat (limited to 'server')
-rw-r--r-- | server/helpers/express-utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index e3ff93cdd..bca59a83c 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -131,8 +131,8 @@ const apiResponseHelpers = (req, res: express.Response, next = null) => { | |||
131 | res.fail = (options) => { | 131 | res.fail = (options) => { |
132 | const { data, status, message, title, type, docs, instance } = { | 132 | const { data, status, message, title, type, docs, instance } = { |
133 | data: null, | 133 | data: null, |
134 | status: HttpStatusCode.BAD_REQUEST_400, | 134 | ...options, |
135 | ...options | 135 | status: options.status || HttpStatusCode.BAD_REQUEST_400 |
136 | } | 136 | } |
137 | 137 | ||
138 | const extension = new ProblemDocumentExtension({ | 138 | const extension = new ProblemDocumentExtension({ |