txId bug fixes; debugging
This commit is contained in:
parent
572bd7a10f
commit
3d9c95ba7f
4 changed files with 20 additions and 11 deletions
|
|
@ -42,6 +42,7 @@ exports.init = function init (conString) {
|
|||
|
||||
// logs inputted bill and overall tx status (if available)
|
||||
exports.recordBill = function recordBill (deviceId, rec) {
|
||||
console.log('DEBUG10: %j', rec)
|
||||
const fields = [
|
||||
'id',
|
||||
'device_id',
|
||||
|
|
@ -66,6 +67,8 @@ exports.recordBill = function recordBill (deviceId, rec) {
|
|||
rec.fiat
|
||||
]
|
||||
|
||||
console.log('DEBUG11: %j', values)
|
||||
|
||||
return db.none(getInsertQuery('bills', fields), values)
|
||||
.catch(err => {
|
||||
if (isUniqueViolation(err)) return logger.warn('Attempt to report bill twice')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue