WIP
This commit is contained in:
parent
0aa457680c
commit
47db8e9ead
7 changed files with 136 additions and 114 deletions
|
|
@ -12,8 +12,9 @@ function loadAccounts () {
|
|||
const toFields = fieldArr => R.fromPairs(R.map(r => [r.code, r.value], fieldArr))
|
||||
const toPairs = r => [r.code, toFields(r.fields)]
|
||||
|
||||
return db.one('select data from user_config where type=$1', 'accounts')
|
||||
return db.oneOrNone('select data from user_config where type=$1', 'accounts')
|
||||
.then(function (data) {
|
||||
if (!data) return {}
|
||||
return R.fromPairs(R.map(toPairs, data.data.accounts))
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue