Skip to content

Commit affce0a

Browse files
authored
remove env (#9)
* remove env * fix
1 parent d991467 commit affce0a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

.env.livenet

Lines changed: 0 additions & 4 deletions
This file was deleted.

mailerlite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const fetch = require('node-fetch');
2+
const conf = require('ocore/conf.js');
23

34
const mailerliteController = async (ctx) => {
45
const email = String(ctx.request.body.email || '');
@@ -13,7 +14,7 @@ const mailerliteController = async (ctx) => {
1314
method: 'POST',
1415
headers: {
1516
'Content-Type': 'application/json',
16-
'X-MailerLite-ApiKey': process.env.MAILERLITE_API_KEY,
17+
'X-MailerLite-ApiKey': conf.mailerlite_api_key,
1718
},
1819
body: JSON.stringify({
1920
email: String(email)

webserver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ router.get('/transfer/:txid*', async (ctx) => {
100100
};
101101
});
102102

103-
if (process.env.MAILERLITE_API_KEY) {
103+
if (conf.mailerlite_api_key) {
104104
router.post('/subscribe', mailerliteController);
105105
}
106106

0 commit comments

Comments
 (0)