add cashOut attribute to machines API
This commit is contained in:
parent
db97533d5c
commit
87a4236313
3 changed files with 109 additions and 116 deletions
|
|
@ -28,8 +28,11 @@ function getMachineNames (config) {
|
|||
return Promise.all([getMachines(), getConfig(config)])
|
||||
.then(([machines, config]) => {
|
||||
const addName = r => {
|
||||
const name = configManager.machineScoped(r.deviceId, config).machineName
|
||||
return _.set('name', name, r)
|
||||
const machineScoped = configManager.machineScoped(r.deviceId, config)
|
||||
const name = machineScoped.machineName
|
||||
const cashOut = machineScoped.cashOutEnabled
|
||||
|
||||
return _.assign(r, {name, cashOut})
|
||||
}
|
||||
|
||||
return _.map(addName, machines)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue