mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Get rid of deprecation warnings.
This commit is contained in:
parent
497395ae39
commit
971559a5be
@ -16,7 +16,7 @@ module.exports = function (app) {
|
|||||||
if (feature) {
|
if (feature) {
|
||||||
res.json(feature);
|
res.json(feature);
|
||||||
} else {
|
} 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();
|
var errors = req.validationErrors();
|
||||||
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
res.json(400, errors);
|
res.status(400).json(errors);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user