add debug

This commit is contained in:
Josh Harvey 2016-05-13 17:57:34 +03:00
parent 5caa110aab
commit 6cfe2259cc

View file

@ -66,7 +66,7 @@ function poll (req, res) {
pids[fingerprint] = {pid: pid, ts: Date.now()} pids[fingerprint] = {pid: pid, ts: Date.now()}
logger.debug('poll request from: %s', fingerprint) // logger.debug('poll request from: %s', fingerprint)
var rates var rates
var balances var balances
@ -266,8 +266,11 @@ function registerRedeem (req, res) {
} }
function waitForDispense (req, res) { function waitForDispense (req, res) {
logger.debug('waitForDispense')
return plugins.fetchTx(session(req)) return plugins.fetchTx(session(req))
.then(tx => { .then(tx => {
logger.debug('tx fetched')
logger.debug(tx)
if (!tx) return res.sendStatus(404) if (!tx) return res.sendStatus(404)
if (tx.status === req.query.status) return res.sendStatus(304) if (tx.status === req.query.status) return res.sendStatus(304)
res.json({tx: tx}) res.json({tx: tx})