fix: remove old config format
This commit is contained in:
parent
c1044232e9
commit
2894ed5efd
1 changed files with 1 additions and 26 deletions
|
|
@ -1,28 +1,3 @@
|
||||||
const number = process.argv[2]
|
|
||||||
const machine = process.argv[3]
|
|
||||||
const old = require('../config.json')
|
const old = require('../config.json')
|
||||||
|
|
||||||
function configAddField (scope, fieldCode, fieldType, fieldClass, value) {
|
console.log(JSON.stringify(old))
|
||||||
return {
|
|
||||||
fieldLocator: {
|
|
||||||
fieldScope: {
|
|
||||||
crypto: scope.crypto,
|
|
||||||
machine: scope.machine
|
|
||||||
},
|
|
||||||
code: fieldCode,
|
|
||||||
fieldType,
|
|
||||||
fieldClass
|
|
||||||
},
|
|
||||||
fieldValue: { fieldType, value }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const scope = { crypto: 'global', machine }
|
|
||||||
|
|
||||||
const newFields = [
|
|
||||||
configAddField(scope, 'cashOutEnabled', 'onOff', null, false),
|
|
||||||
configAddField(scope, 'machineName', 'string', null, number),
|
|
||||||
configAddField(scope, 'machineModel', 'string', null, 'Linux')
|
|
||||||
]
|
|
||||||
const data = { config: newFields.concat(old.config) }
|
|
||||||
console.log(JSON.stringify(data))
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue