From 971559a5be02a6a991a9a04b17e0f5e7960b4cca Mon Sep 17 00:00:00 2001 From: Jari Bakken Date: Mon, 3 Nov 2014 12:43:23 +0100 Subject: [PATCH] Get rid of deprecation warnings. --- lib/featureApi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/featureApi.js b/lib/featureApi.js index 1cb23721c1..0c830ad3c2 100644 --- a/lib/featureApi.js +++ b/lib/featureApi.js @@ -16,7 +16,7 @@ module.exports = function (app) { if (feature) { res.json(feature); } else { - res.json(404, {error: 'Could not find feature'}); + res.status(404).json({error: 'Could not find feature'}); } }); }); @@ -28,7 +28,7 @@ module.exports = function (app) { var errors = req.validationErrors(); if (errors) { - res.json(400, errors); + res.status(400).json(errors); return; }