From 61946c95e91ca728b910d4e0c738dfaff0f06f09 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 1 Apr 2019 21:58:16 -0700 Subject: linting --- index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e901db85..ab1937b7 100644 --- a/index.js +++ b/index.js @@ -254,7 +254,7 @@ const authy = new Client({ key: config.authy.key }); let block = bitcoin.Block.fromHex(message) l('block', block.getHash().toString('hex')) - let payments = await db.Payment.findAll({ + await db.Payment.findAll({ include: { model: db.User, as: 'user' }, where: { confirmed: false }, }).map(async p => { @@ -394,17 +394,24 @@ const authy = new Client({ key: config.authy.key }); }) app.post('/forgot', async (req, res) => { + let { user } = req let mg = mailgun(config.mailgun) let msg = { from: 'CoinOS ', to: user.email, subject: 'CoinOS Password Reset', - html: `Visit https://localhost/reset/${user.username}/${ + }">https://coinos.io/reset/${user.username}/${ user.token } to reset your password.`, } + + try { + mg.messages().send(msg) + } catch (e) { + l(e) + } }) app.get('/verifyEmail/:username/:token', auth, async (req, res) => { -- cgit v1.2.3