diff options
| author | Adam Soltys <[email protected]> | 2017-09-09 21:58:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2017-09-09 21:58:47 -0700 |
| commit | ce0c25444f6d752944bbc962ae210cf24042f8d3 (patch) | |
| tree | 051ff98c48ac0b4ab02791c948f4952cebc80b32 /routes/transactions.js | |
| parent | e30ba71ea6559d741209af9f8dfcd83133caa55d (diff) | |
| download | coinos-server-ce0c25444f6d752944bbc962ae210cf24042f8d3.tar.gz coinos-server-ce0c25444f6d752944bbc962ae210cf24042f8d3.zip | |
use dotenv for config
Diffstat (limited to 'routes/transactions.js')
| -rw-r--r-- | routes/transactions.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/routes/transactions.js b/routes/transactions.js index c6a86271..7cf7f408 100644 --- a/routes/transactions.js +++ b/routes/transactions.js @@ -1,13 +1,7 @@ (function() { - var Promise, config, db, moment, txid; - - Promise = require('bluebird'); - - db = require('../redis'); - - config = require("../config"); - - moment = require('moment'); + const Promise = require('bluebird') + const db = require('../redis') + const moment = require('moment') txid = function(transaction, user) { if (transaction.match(/[a-z]/i)) { @@ -84,7 +78,7 @@ subject = 'Payment Received'; content = new helper.Content('text/html', html); mail = new helper.Mail(from_email, subject, to_email, content); - sg = require('sendgrid')(config.sendgrid_token); + sg = require('sendgrid')(process.env.SENDGRID_TOKEN); request = sg.emptyRequest({ method: 'POST', path: '/v3/mail/send', |
