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:
@@ -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({});
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user