mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 00:53:26 +02:00
Fix express warning for deprecated res.json(stat) message
This commit is contained in:
@@ -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
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user