2018-03-09 16:45:24 -08:00
|
|
|
function SlackConfig () {
|
|
|
|
this.slackWebHook = 'default';
|
|
|
|
this.slackErrorChannel = 'default';
|
|
|
|
this.slackInfoChannel = 'default';
|
2018-03-12 19:26:03 -07:00
|
|
|
this.configure = (config) => {
|
|
|
|
if (!config) {
|
2018-03-12 19:33:09 -07:00
|
|
|
return console.log('No slack config received.');
|
2018-03-12 19:26:03 -07:00
|
|
|
}
|
|
|
|
const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;
|
|
|
|
this.slackWebHook = slackWebHook;
|
|
|
|
this.slackErrorChannel = slackErrorChannel;
|
|
|
|
this.slackInfoChannel = slackInfoChannel;
|
2018-03-09 16:45:24 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = new SlackConfig();
|