WIP
This commit is contained in:
parent
3d9c95ba7f
commit
2e584c558d
3 changed files with 23 additions and 11 deletions
|
|
@ -231,7 +231,7 @@ exports.addDispenseRequest = function addDispenseRequest (tx) {
|
|||
const sql2 = 'insert into cash_out_actions (cash_out_txs_id, action) values ($1, $2)'
|
||||
|
||||
return db.none(sql2, [tx.id, 'dispenseRequested'])
|
||||
.then(() => ({dispense: true}))
|
||||
.then(() => ({dispense: true, txId: tx.id}))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -408,6 +408,7 @@ exports.cachedResponse = function (deviceId, txId, path, method) {
|
|||
.then(() => ({}))
|
||||
.catch(err => {
|
||||
if (!isUniqueViolation(err)) throw err
|
||||
console.log('DEBUG22: %j', err)
|
||||
return db.one(sql, values)
|
||||
.then(row => ({body: row.body}))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue