Update models more

This commit is contained in:
John Lyon-Smith
2018-03-22 10:18:34 -07:00
parent e15c38c0bc
commit 82fbd88dab
16 changed files with 7856 additions and 3925 deletions

View File

@@ -51,7 +51,9 @@ export class EmailHandlers {
}
// configure AWS SDK
aws.config = new aws.Config(config.get('awsConfig'));
const awsConfig = config.get('awsConfig')
aws.config = new aws.Config(awsConfig)
// create Nodemailer SES transporter
let transporter = nodemailer.createTransport({
@@ -60,7 +62,7 @@ export class EmailHandlers {
})
});
const senderEmail = config.get('senderEmail')
const senderEmail = config.get('email.senderEmail')
const template = this.templates[templateName]
if (!template) {

View File

@@ -13,8 +13,8 @@ export class MS {
async connect(amqpUri) {
this.connection = await amqp.connect(amqpUri)
this.connection.on('error', () => {
this.log.error(`RabbitMQ has gone, shutting down service`)
this.connection.on('error', (err) => {
this.log.error(`${err}. Shutting down service.`)
process.exit(-1)
})