aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/index.js b/index.js
index c0a6beb7..e23e29fc 100644
--- a/index.js
+++ b/index.js
@@ -218,8 +218,17 @@ const l = console.log
await db.User.findAll({
attributes: ['id', 'pending'],
- where: { pending: { [Sequelize.Op.ne]: null } },
- }).map(async u => { u.balance = u.pending; u.pending = 0; await u.save() })
+ where: {
+ pending: {
+ [Sequelize.Op.ne]: null,
+ [Sequelize.Op.ne]: 0,
+ }
+ },
+ }).map(async u => {
+ u.balance = u.pending
+ u.pending = 0
+ await u.save()
+ })
await db.Payment.update({
confirmed: true,
@@ -498,7 +507,6 @@ const l = console.log
let ask = res.data.asks[0][0]
let now = new Date()
let ts = `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`
- l(sids)
l(ts, 'quadriga ask price:', ask)
app.set('rates', { ask })
socket.emit('rate', ask)