Chore: refactor to use new schema changing queries
This commit is contained in:
parent
304f792484
commit
e6059be8d2
44 changed files with 185 additions and 171 deletions
|
|
@ -37,7 +37,7 @@ function batch () {
|
|||
from cash_out_txs
|
||||
order by created desc limit $1`
|
||||
|
||||
return Promise.all([db.any(cashInSql, [cashInTx.PENDING_INTERVAL, NUM_RESULTS]), db.any(cashOutSql, [NUM_RESULTS, REDEEMABLE_AGE])])
|
||||
return Promise.all([db.$any(cashInSql, [cashInTx.PENDING_INTERVAL, NUM_RESULTS]), db.$any(cashOutSql, [NUM_RESULTS, REDEEMABLE_AGE])])
|
||||
.then(packager)
|
||||
}
|
||||
|
||||
|
|
@ -57,8 +57,8 @@ function single (txId) {
|
|||
where id=$1`
|
||||
|
||||
return Promise.all([
|
||||
db.oneOrNone(cashInSql, [cashInTx.PENDING_INTERVAL, txId]),
|
||||
db.oneOrNone(cashOutSql, [txId, REDEEMABLE_AGE])
|
||||
db.$oneOrNone(cashInSql, [cashInTx.PENDING_INTERVAL, txId]),
|
||||
db.$oneOrNone(cashOutSql, [txId, REDEEMABLE_AGE])
|
||||
])
|
||||
.then(packager)
|
||||
.then(_.head)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue