Skip to content

Commit 7626753

Browse files
committed
remove demo slack webhook env var from global config
1 parent d337e83 commit 7626753

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

config/default.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,5 @@ module.exports = {
274274
RESOURCE_BOOKING_EXPIRY_TIME: process.env.RESOURCE_BOOKING_EXPIRY_TIME || 'P21D',
275275
// The Stripe
276276
STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
277-
CURRENCY: process.env.CURRENCY || 'usd',
278-
// The slack webhook url to send slack notifications
279-
SLACK_WEBHOOK_URL: process.env.SLACK_WEBHOOK_URL
277+
CURRENCY: process.env.CURRENCY || 'usd'
280278
}

scripts/demo-email-notifications/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ async function initConsumer () {
7171
fs.writeFileSync(`./out/${notification.details.data.subject}-${Date.now()}.html`, email)
7272
})
7373
for (const notification of _.filter(message.payload.notifications, ['serviceId', 'slack'])) {
74-
if (config.SLACK_WEBHOOK_URL) {
75-
await axios.post(config.SLACK_WEBHOOK_URL, { text: notification.details.text, blocks: notification.details.blocks })
74+
if (process.env.SLACK_WEBHOOK_URL) {
75+
await axios.post(process.env.SLACK_WEBHOOK_URL, { text: notification.details.text, blocks: notification.details.blocks })
7676
}
7777
}
7878
}

0 commit comments

Comments
 (0)