From 1cfbdd30d9913bfaa0c7e54f82e5b953646bb0d1 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 1 Jun 2021 13:25:41 +0200 Subject: refactor deprecated body-parser usage --- server/helpers/express-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/helpers/express-utils.ts') 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) => { res.fail = (options) => { const { data, status, message, title, type, docs, instance } = { data: null, - status: HttpStatusCode.BAD_REQUEST_400, - ...options + ...options, + status: options.status || HttpStatusCode.BAD_REQUEST_400 } const extension = new ProblemDocumentExtension({ -- cgit v1.2.3