WIPP
This commit is contained in:
parent
b4d8f3cd4c
commit
340b39d47d
9 changed files with 189 additions and 72 deletions
|
|
@ -71,12 +71,15 @@ function fetchPhoneTx (phone) {
|
|||
}
|
||||
|
||||
function fetchStatusTx (txId, status) {
|
||||
console.log('DEBUG444')
|
||||
const sql = 'select * from cash_out_txs where id=$1'
|
||||
|
||||
return db.oneOrNone(sql, [txId, status])
|
||||
return db.oneOrNone(sql, [txId])
|
||||
.then(toObj)
|
||||
.then(tx => {
|
||||
console.log('DEBUG445')
|
||||
if (!tx) throw httpError('No transaction', 404)
|
||||
console.log('DEBUG446')
|
||||
if (tx.status === status) throw httpError('Not Modified', 304)
|
||||
return tx
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue