From 7357626ec461d1374ff8f040fa88bfa9261e6786 Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Mon, 29 Jul 2024 16:33:35 +0100 Subject: [PATCH] feat: make sendgrid's template ids configurable (#13) --- server/src/email/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/email/index.ts b/server/src/email/index.ts index c54da8b1e..7e23e2b59 100644 --- a/server/src/email/index.ts +++ b/server/src/email/index.ts @@ -20,17 +20,17 @@ import type { NotificationType } from 'server/src/entity/notification/Notificati sgMail.default.setApiKey(env.SENDGRID_API_KEY); export const DEFAULT_MENTION_NOTIFICATION_V2_TEMPLATE_ID = - 'd-6309e6ccb36a4a769957795f475c8130'; + process.env.DEFAULT_MENTION_NOTIFICATION_V2_TEMPLATE_ID || 'd-6309e6ccb36a4a769957795f475c8130'; export const MENTION_NOTIFICATION_NO_POWERED_BY_CORD_TEMPLATE_ID = - 'd-8a8088e59eed4622b2d09078de372fe8'; + process.env.MENTION_NOTIFICATION_NO_POWERED_BY_CORD_TEMPLATE_ID || 'd-8a8088e59eed4622b2d09078de372fe8'; export const DEFAULT_SHARE_TO_EMAIL_TEMPLATE_ID = - 'd-fecc876acf684ff2bca887748d86e4e1'; + process.env.DEFAULT_SHARE_TO_EMAIL_TEMPLATE_ID || 'd-fecc876acf684ff2bca887748d86e4e1'; export const SHARE_TO_EMAIL_NO_POWERED_BY_CORD_TEMPLATE_ID = - 'd-b70dc2c71ee541ee9e0c5f4cd84b32e3'; + process.env.SHARE_TO_EMAIL_NO_POWERED_BY_CORD_TEMPLATE_ID || 'd-b70dc2c71ee541ee9e0c5f4cd84b32e3'; export const DEFAULT_THREAD_RESOLVE_TEMPLATE_ID = - 'd-93aa618e7d0b4ba593c346f9a1f664c5'; + process.env.DEFAULT_THREAD_RESOLVE_TEMPLATE_ID || 'd-93aa618e7d0b4ba593c346f9a1f664c5'; export const THREAD_RESOLVE_NO_POWERED_BY_CORD_TEMPLATE_ID = - 'd-37c14e17cc9649afb70495f029b3833d'; + process.env.THREAD_RESOLVE_NO_POWERED_BY_CORD_TEMPLATE_ID || 'd-37c14e17cc9649afb70495f029b3833d'; const SEND_CONSOLE_USER_INVITE_TEMPLATE_ID = 'd-ab157e4f588c4a30b6304e4e062b5f88'; const ACCESS_GRANTED_TO_CONSOLE_USER_TEMPLATE_ID =