use template id stored in env

This commit is contained in:
Hongbo Wu
2022-07-25 18:43:52 +08:00
committed by Jackson Harper
parent fe180c5b50
commit 8d5da15064
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,9 @@ export const sendInstallInstructionsResolver = authorized<
const sendInstallInstructions = await sendEmail({
from: env.sender.message,
templateId: INSTALL_INSTRUCTIONS_EMAIL_TEMPLATE_ID,
templateId:
env.sendgrid.installationTemplateId ||
INSTALL_INSTRUCTIONS_EMAIL_TEMPLATE_ID,
to: user?.email,
})

View File

@ -104,7 +104,7 @@ export function remindersServiceRouter() {
await sendEmail({
from: env.sender.message,
dynamicTemplateData: dynamicTemplateData,
templateId: process.env.SENDGRID_REMINDER_TEMPLATE_ID,
templateId: env.sendgrid.reminderTemplateId,
to: user.email,
})