From c59922ed41778319bd70f591b9b12f54e38ba589 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 14 Jun 2023 10:06:59 -0400 Subject: [PATCH] Replace last send usage Signed-off-by: josh --- plugins/nomad-backend/src/service/router.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/nomad-backend/src/service/router.ts b/plugins/nomad-backend/src/service/router.ts index f36c9e657e..f9355b27d0 100644 --- a/plugins/nomad-backend/src/service/router.ts +++ b/plugins/nomad-backend/src/service/router.ts @@ -72,9 +72,7 @@ export async function createRouter( if (allocationsResp.status !== 200) { const body = await allocationsResp.text(); logger.error(`failed to call /v1/allocations endpoint: ${body}`); - res.status(allocationsResp.status).json({ - message: body, - }); + res.status(allocationsResp.status).json({ message: body }); return; } @@ -114,9 +112,7 @@ export async function createRouter( if (apiResp.status !== 200) { const body = await apiResp.text(); logger.error(`failed to call /v1/job/:job_id/versions endpoint: ${body}`); - resp.status(apiResp.status).send({ - message: body, - }); + resp.status(apiResp.status).json({ message: body }); return; }