chore: undo $ prepend on queries

This commit is contained in:
Taranto 2021-07-22 11:06:39 +01:00 committed by Josh Harvey
parent f3f2bb01b0
commit ba4117173e
50 changed files with 215 additions and 227 deletions

View file

@ -69,7 +69,7 @@ function logAction (rec, tx) {
const sql = pgp.helpers.insert(action, null, 'cash_in_actions')
return db.$none(sql)
return db.none(sql)
.then(_.constant(rec))
}
@ -77,7 +77,7 @@ function logActionById (action, _rec, txId) {
const rec = _.assign(_rec, { action, tx_id: txId })
const sql = pgp.helpers.insert(rec, null, 'cash_in_actions')
return db.$none(sql)
return db.none(sql)
}
function checkForBlacklisted (tx) {
@ -165,7 +165,7 @@ function monitorPending (settings) {
.catch(logger.error)
}
return db.$any(sql, [PENDING_INTERVAL, MAX_PENDING])
return db.any(sql, [PENDING_INTERVAL, MAX_PENDING])
.then(rows => pEachSeries(rows, row => processPending(row)))
.catch(logger.error)
}
@ -182,7 +182,7 @@ function cancel (txId) {
return pgp.helpers.update(updateRec, null, 'cash_in_txs') +
pgp.as.format(' where id=$1', [txId])
})
.then(sql => db.$result(sql, false))
.then(sql => db.result(sql, false))
.then(res => {
if (res.rowCount !== 1) throw new Error('No such tx-id')
})