WIP
This commit is contained in:
parent
340ad2b518
commit
b7a93b89f5
5 changed files with 159 additions and 77 deletions
|
|
@ -72,15 +72,12 @@ 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])
|
||||
.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