diff options
| author | Adam Soltys <[email protected]> | 2019-04-01 21:58:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2019-04-01 21:58:16 -0700 |
| commit | 61946c95e91ca728b910d4e0c738dfaff0f06f09 (patch) | |
| tree | 248c21a3d6aa13333927a603f989167dbadc4680 /index.js | |
| parent | ffafbc875a1728eeaec9bb11248aa097b856268f (diff) | |
| download | coinos-server-61946c95e91ca728b910d4e0c738dfaff0f06f09.tar.gz coinos-server-61946c95e91ca728b910d4e0c738dfaff0f06f09.zip | |
linting
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 <[email protected]>', to: user.email, subject: 'CoinOS Password Reset', - html: `Visit <a href="https://localhost/reset/${user.username}/${ + html: `Visit <a href="https://coinos.io/reset/${user.username}/${ user.token - }">https://localhost/reset/${user.username}/${ + }">https://coinos.io/reset/${user.username}/${ user.token }</a> to reset your password.`, } + + try { + mg.messages().send(msg) + } catch (e) { + l(e) + } }) app.get('/verifyEmail/:username/:token', auth, async (req, res) => { |
