From 17b493a3a59f1b10846da7d3453213fff379d685 Mon Sep 17 00:00:00 2001 From: Andrew Shirley Date: Fri, 25 Jun 2021 14:32:37 +0100 Subject: [PATCH] Use res.json not res.send Signed-off-by: Andrew Shirley Signed-off-by: blam --- plugins/jenkins-backend/src/service/router.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/jenkins-backend/src/service/router.ts b/plugins/jenkins-backend/src/service/router.ts index c097b338ef..f001fe4c1c 100644 --- a/plugins/jenkins-backend/src/service/router.ts +++ b/plugins/jenkins-backend/src/service/router.ts @@ -66,7 +66,7 @@ export async function createRouter( }); const projects = await jenkinsApi.getProjects(jenkinsInfo, branchStr); - response.send({ + response.json({ projects: projects, }); }, @@ -92,7 +92,7 @@ export async function createRouter( parseInt(buildNumber, 10), ); - response.send({ + response.json({ build: build, }); }, @@ -115,7 +115,7 @@ export async function createRouter( await jenkinsApi.buildProject(jenkinsInfo, jobName); // TODO: return the buildNumber which was started. - response.send({}); + response.json({}); }, );