From d0c65b7e674b974118999642a45bf02133743335 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Tue, 20 Aug 2024 10:30:42 +0100 Subject: [PATCH] fix: encode universal systemcheck handler as json --- lib/client/routesHandler/systemCheckHandler.ts | 2 +- test/functional/systemcheck-universal.test.ts | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/client/routesHandler/systemCheckHandler.ts b/lib/client/routesHandler/systemCheckHandler.ts index e1166a071..4c568f169 100644 --- a/lib/client/routesHandler/systemCheckHandler.ts +++ b/lib/client/routesHandler/systemCheckHandler.ts @@ -40,7 +40,7 @@ export const systemCheckHandler = async (req: Request, res: Response) => { } validationResults.push(result); } - res.status(isValidationPassing ? 200 : 500).send(validationResults); + res.status(isValidationPassing ? 200 : 500).json(validationResults); } else { const brokerClientValidationMethod = clientOpts.config.brokerClientValidationMethod || 'GET'; diff --git a/test/functional/systemcheck-universal.test.ts b/test/functional/systemcheck-universal.test.ts index 0da01e50a..9fc633287 100644 --- a/test/functional/systemcheck-universal.test.ts +++ b/test/functional/systemcheck-universal.test.ts @@ -409,9 +409,6 @@ describe('broker client systemcheck endpoint', () => { `http://localhost:${bc.port}/systemcheck`, { timeout: 10_000, - headers: { - 'Content-Type': 'application/json', - }, }, );