From 2aa1f045ffafc65ad4d762ef5cc1bead39a32d73 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 26 Sep 2016 18:10:20 +0200 Subject: [PATCH] Use .status() API --- app/controllers/health_check_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/health_check_controller.js b/app/controllers/health_check_controller.js index 29458cf9..a5f84f12 100644 --- a/app/controllers/health_check_controller.js +++ b/app/controllers/health_check_controller.js @@ -24,11 +24,11 @@ HealthCheckController.prototype.handleHealthCheck = function (req, res) { if (err) { response.err = err.message; } - res.send(response, ok ? 200 : 503); + res.status(ok ? 200 : 503).send(response); }); } else { - res.send({enabled: false, ok: true}, 200); + res.status(200).send({enabled: false, ok: true}); } };