aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2019-04-01 21:58:16 -0700
committerAdam Soltys <[email protected]>2019-04-01 21:58:16 -0700
commit61946c95e91ca728b910d4e0c738dfaff0f06f09 (patch)
tree248c21a3d6aa13333927a603f989167dbadc4680
parentffafbc875a1728eeaec9bb11248aa097b856268f (diff)
downloadcoinos-server-61946c95e91ca728b910d4e0c738dfaff0f06f09.tar.gz
coinos-server-61946c95e91ca728b910d4e0c738dfaff0f06f09.zip
linting
-rw-r--r--index.js13
1 files 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 <[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) => {