Use res.json not res.send

Signed-off-by: Andrew Shirley <andrew.shirley@sainsburys.co.uk>
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
Andrew Shirley
2021-06-25 14:32:37 +01:00
committed by blam
parent 0581c1f554
commit 17b493a3a5
@@ -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({});
},
);