Skip to content

Commit 0daafec

Browse files
committed
Changing template ids
1 parent bdaa7a2 commit 0daafec

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

config/email_template.config.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,48 +103,48 @@ module.exports = {
103103
sendgridTemplateId: config.INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID
104104
}
105105
},
106-
cronEmailTemplates: {
107-
'candidate-review': {
106+
notificationEmailTemplates: {
107+
'taas.notification.candidates-available-for-review': {
108108
subject: 'Topcoder - {{teamName}} has job candidates available for review',
109109
body: '',
110110
recipients: [],
111111
from: config.NOTIFICATION_SENDER_EMAIL,
112-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
112+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
113113
},
114-
'interview-coming-up-host': {
114+
'taas.notification.interview-coming-up-host': {
115115
subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{guestFullName}}',
116116
body: '',
117117
recipients: [],
118118
from: config.NOTIFICATION_SENDER_EMAIL,
119-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
119+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
120120
},
121-
'interview-coming-up-guest': {
121+
'taas.notification.interview-coming-up-guest': {
122122
subject: 'Topcoder - Interview Coming Up: {{jobTitle}} with {{hostFullName}}',
123123
body: '',
124124
recipients: [],
125125
from: config.NOTIFICATION_SENDER_EMAIL,
126-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
126+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
127127
},
128-
'interview-completed': {
128+
'taas.notification.interview-awaits-resolution': {
129129
subject: 'Topcoder - Interview Awaits Resolution: {{jobTitle}} for {{guestFullName}}',
130130
body: '',
131131
recipients: [],
132132
from: config.NOTIFICATION_SENDER_EMAIL,
133-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
133+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
134134
},
135-
'post-interview-action': {
135+
'taas.notification.post-interview-action-required': {
136136
subject: 'Topcoder - Candidate Action Required in {{teamName}} for {{numCandidates}} candidates',
137137
body: '',
138138
recipients: [],
139139
from: config.NOTIFICATION_SENDER_EMAIL,
140-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
140+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
141141
},
142-
'resource-booking-expiration': {
142+
'taas.notification.resource-booking-expiration': {
143143
subject: 'Topcoder - Resource Booking Expiring in {{teamName}} for {{numResourceBookings}} resource bookings',
144144
body: '',
145145
recipients: [],
146146
from: config.NOTIFICATION_SENDER_EMAIL,
147-
sendgrid_template_id: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
147+
sendgridTemplateId: config.NOTIFICATION_SENDGRID_TEMPLATE_ID
148148
}
149149
}
150150
}

src/services/EmailNotificationService.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const localLogger = {
2020
info: (message, context) => logger.info({ component: 'EmailNotificationService', context, message })
2121
}
2222

23-
const emailTemplates = helper.getEmailTemplatesForKey('cronEmailTemplates')
23+
const emailTemplates = helper.getEmailTemplatesForKey('notificationEmailTemplates')
2424

2525
/**
2626
* Returns the project with the given id
@@ -163,7 +163,7 @@ async function sendCandidatesAvailableEmails () {
163163
}
164164

165165
sendEmail({}, {
166-
template: 'candidate-review',
166+
template: 'taas.notification.candidates-available-for-review',
167167
recipients: recipientEmails,
168168
data: {
169169
teamName: project.name,
@@ -235,7 +235,7 @@ async function sendInterviewComingUpEmails () {
235235

236236
if (!_.isEmpty(interview.hostEmail)) {
237237
sendEmail({}, {
238-
template: 'interview-coming-up-host',
238+
template: 'taas.notification.interview-coming-up-host',
239239
recipients: [interview.hostEmail],
240240
data: {
241241
...data,
@@ -252,7 +252,7 @@ async function sendInterviewComingUpEmails () {
252252
if (!_.isEmpty(interview.guestEmails)) {
253253
// send guest emails
254254
sendEmail({}, {
255-
template: 'interview-coming-up-guest',
255+
template: 'taas.notification.interview-coming-up-guest',
256256
recipients: interview.guestEmails,
257257
data: {
258258
...data,
@@ -310,7 +310,7 @@ async function sendInterviewCompletedEmails () {
310310
if (!data) { continue }
311311

312312
sendEmail({}, {
313-
template: 'interview-completed',
313+
template: 'taas.notification.interview-awaits-resolution',
314314
recipients: [interview.hostEmail],
315315
data: {
316316
...data,
@@ -376,7 +376,7 @@ async function sendPostInterviewActionEmails () {
376376
}
377377

378378
sendEmail({}, {
379-
template: 'post-interview-action',
379+
template: 'taas.notification.post-interview-action-required',
380380
recipients: recipientEmails,
381381
data: {
382382
teamName: project.name,
@@ -450,7 +450,7 @@ async function sendResourceBookingExpirationEmails () {
450450
}
451451

452452
sendEmail({}, {
453-
template: 'resource-booking-expiration',
453+
template: 'taas.notification.resource-booking-expiration',
454454
recipients: recipientEmails,
455455
data: {
456456
teamName: project.name,

0 commit comments

Comments
 (0)