spee.ch/config/slackConfig.js

17 lines
502 B
JavaScript
Raw Normal View History

function SlackConfig () {
this.slackWebHook = 'default';
this.slackErrorChannel = 'default';
this.slackInfoChannel = 'default';
2018-03-13 03:26:03 +01:00
this.configure = (config) => {
if (!config) {
return console.log('No slack config received.');
2018-03-13 03:26:03 +01:00
}
const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;
this.slackWebHook = slackWebHook;
this.slackErrorChannel = slackErrorChannel;
this.slackInfoChannel = slackInfoChannel;
};
};
module.exports = new SlackConfig();