spee.ch/config/slackConfig.js
2018-03-12 19:26:03 -07:00

18 lines
538 B
JavaScript

const logger = require('winston');
function SlackConfig () {
this.slackWebHook = 'default';
this.slackErrorChannel = 'default';
this.slackInfoChannel = 'default';
this.configure = (config) => {
if (!config) {
return logger.warn('No slack config received.');
}
const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;
this.slackWebHook = slackWebHook;
this.slackErrorChannel = slackErrorChannel;
this.slackInfoChannel = slackInfoChannel;
};
};
module.exports = new SlackConfig();