diff options
| author | Adam Soltys <[email protected]> | 2021-03-26 15:01:28 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-04-27 18:06:39 -0400 |
| commit | 2621fec1c189b6de5e3bd2b86b391443ccd7a8a7 (patch) | |
| tree | 4f076cc8291d73f971f8e3861c4905ba20e690fe | |
| parent | 3c0e24599686733e85079241e9f38017f8027362 (diff) | |
| download | coinos-server-2621fec1c189b6de5e3bd2b86b391443ccd7a8a7.tar.gz coinos-server-2621fec1c189b6de5e3bd2b86b391443ccd7a8a7.zip | |
enable trading
| -rw-r--r-- | lib/mail.js | 5 | ||||
| -rw-r--r-- | routes/users.js | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/mail.js b/lib/mail.js index 4ddb02fe..e690d305 100644 --- a/lib/mail.js +++ b/lib/mail.js @@ -29,7 +29,8 @@ imap.once("ready", function() { }); stream.once("end", async function() { let accounts = config.imap.accounts; - let user_id = accounts[Object.keys(accounts).find(a => buffer.includes(a))]; + let a = Object.keys(accounts).find(a => buffer.includes(a)); + let user_id = accounts[a]; if (!emails[seqno] && user_id) { let cad = parseFloat( @@ -65,7 +66,7 @@ imap.once("ready", function() { let payment = await db.Payment.create({ account_id: account.id, user_id: account.user_id, - hash: `Interac deposit: ${amount} CAD`, + hash: `Interac deposit: ${cad} CAD`, amount, currency: "CAD", rate, diff --git a/routes/users.js b/routes/users.js index d0232eb4..d6dc68a7 100644 --- a/routes/users.js +++ b/routes/users.js @@ -202,6 +202,7 @@ app.post( hex }); emit(req.user.username, "key", key); + res.send(key); }) ); @@ -364,7 +365,7 @@ app.post( user = pick(user, ...whitelist); res.send({ user, token }); } catch (e) { - // l.error("login error", e.message); + l.error("login error", e.message); res.status(401).end(); } }) |
