mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
Fix eslint errors
This commit is contained in:
parent
a875d85c46
commit
b60cb6ef6a
7 changed files with 49 additions and 35 deletions
|
@ -23,10 +23,12 @@ function getDevices(req, res) {
|
|||
|
||||
list.forEach(function(device) {
|
||||
datautil.normalize(device, req.user)
|
||||
var responseDevice = device
|
||||
|
||||
if (fields) {
|
||||
device = _.pick(device, fields.split(','))
|
||||
responseDevice = _.pick(device, fields.split(','))
|
||||
}
|
||||
deviceList.push(device)
|
||||
deviceList.push(responseDevice)
|
||||
})
|
||||
|
||||
res.json({
|
||||
|
@ -57,13 +59,15 @@ function getDeviceBySerial(req, res) {
|
|||
}
|
||||
|
||||
datautil.normalize(device, req.user)
|
||||
if(fields) {
|
||||
device = _.pick(device, fields.split(','))
|
||||
var responseDevice = device
|
||||
|
||||
if (fields) {
|
||||
responseDevice = _.pick(device, fields.split(','))
|
||||
}
|
||||
|
||||
res.json({
|
||||
success: true
|
||||
, device: device
|
||||
, device: responseDevice
|
||||
})
|
||||
})
|
||||
.catch(function(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue