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:
parent
96494247bb
commit
25cee263b2
3 changed files with 22 additions and 22 deletions
|
@ -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
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue