Skip to content

Commit

Permalink
fix mailer usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlescano committed Jul 10, 2017
1 parent 94ba993 commit 79350cc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/jobs/lib/comment-reply.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const monk = require('monk')
const t = require('t-component')
const templates = require('../../templates')
const mailer = require('../../mailer')
const utils = require('../../utils')

const jobName = 'comment-reply'
const jobNameForSingleUser = 'comment-reply-single-recipient'
const template = templates[jobName]

module.exports = function topicPublished (notifier) {
const { db, agenda } = notifier
const { db, agenda, mailer } = notifier
const users = db.get('users')
const comments = db.get('comments')

Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/lib/forgot-password.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const t = require('t-component')
const utils = require('../../utils')
const templates = require('../../templates')
const mailer = require('../../mailer')

const jobName = 'forgot-password'
const template = templates[jobName]

module.exports = function forgotPassword (notifier) {
const { db, agenda } = notifier
const { db, agenda, mailer } = notifier
const users = db.get('users')

agenda.define(jobName, { priority: 'high' }, (job, done) => {
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/lib/topic-published.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const t = require('t-component')
const templates = require('../../templates')
const mailer = require('../../mailer')
const utils = require('../../utils')

const jobName = 'topic-published'
const jobNameForSingleUser = 'topic-published-single-recipient'
const template = templates[jobName]

module.exports = function topicPublished (notifier) {
const { db, agenda } = notifier
const { db, agenda, mailer } = notifier
const users = db.get('users')

agenda.define(jobName, (job, done) => {
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/lib/welcome-email.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const t = require('t-component')
const utils = require('../../utils')
const templates = require('../../templates')
const mailer = require('../../mailer')

const jobName = 'welcome-email'
const template = templates[jobName]

module.exports = function welcomeEmail (notifier) {
const { db, agenda } = notifier
const { db, agenda, mailer } = notifier
const users = db.get('users')

agenda.define(jobName, { priority: 'high' }, welcomeEmailJob)
Expand Down

0 comments on commit 79350cc

Please sign in to comment.