Use .status() API

This commit is contained in:
Raul Ochoa 2016-09-26 18:10:20 +02:00
parent 96fc32b24a
commit 2aa1f045ff

View File

@ -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});
}
};