db bug fix; sweep fixes
This commit is contained in:
parent
44188aa5ba
commit
751067bace
3 changed files with 17 additions and 24 deletions
|
|
@ -424,7 +424,7 @@ exports.cacheResponse = function (session, path, method, body) {
|
|||
exports.nextCashOutSerialHD = function nextCashOutSerialHD (sessionId, cryptoCode) {
|
||||
const sql = `select hd_serial from cash_out_hds
|
||||
where crypto_code=$1 order by hd_serial desc limit 1`
|
||||
const attempt = db.oneOrNone(sql, [cryptoCode])
|
||||
const attempt = () => db.oneOrNone(sql, [cryptoCode])
|
||||
.then(row => {
|
||||
const serialNumber = row ? row.hd_serial + 1 : 0
|
||||
const fields2 = ['session_id', 'crypto_code', 'hd_serial']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue