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

@ -52,7 +52,7 @@ function fetchPhoneTx (phone) {
const values = [phone, false, TRANSACTION_EXPIRATION]
return db.$any(sql, values)
return db.any(sql, values)
.then(_.map(toCashOutTx))
.then(txs => {
const seenTxs = _.some(it => it.status !== 'notSeen', txs)
@ -76,7 +76,7 @@ function fetchPhoneTx (phone) {
function fetchStatusTx (txId, status) {
const sql = 'select * from cash_out_txs where id=$1'
return db.$oneOrNone(sql, [txId])
return db.oneOrNone(sql, [txId])
.then(toCashOutTx)
.then(tx => {
if (!tx) throw httpError('No transaction', 404)
@ -86,7 +86,7 @@ function fetchStatusTx (txId, status) {
}
function updateDeviceConfigVersion (versionId) {
return db.$none('update devices set user_config_id=$1', [versionId])
return db.none('update devices set user_config_id=$1', [versionId])
}
module.exports = {