1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Fix express warning for deprecated res.json(stat) message

This commit is contained in:
Vishal Banthia 2015-12-07 23:03:38 +09:00
parent 96494247bb
commit 25cee263b2
3 changed files with 22 additions and 22 deletions

View file

@ -31,7 +31,7 @@ function getDevices(req, res) {
})
.catch(function(err) {
log.error('Failed to load device list: ', err.stack)
res.json(500, {
res.status(500).json({
success: false
})
})
@ -56,14 +56,14 @@ function getDeviceBySerial(req, res) {
})
}
else {
res.json(404, {
res.status(404).json({
success: false
})
}
})
.catch(function(err) {
log.error('Failed to load device "%s": ', req.params.serial, err.stack)
res.json(500, {
res.status(500).json({
success: false
})
})