Skip to content

Commit 7f3bbef

Browse files
committed
changes done as per review comments
1 parent c3706db commit 7f3bbef

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

packages/backend/src/config/getDeliveryServiceProperties.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const DEFAULT_DELIVERY_SERVICE_PROPERTIES: DeliveryServiceProperties = {
1010
//100Kb
1111
sizeLimit: 100000,
1212
notificationChannel: [],
13-
smtpHost: process.env.SMTP_HOST as string,
14-
smtpPort: Number(process.env.SMTP_PORT),
15-
smtpEmail: process.env.SMTP_EMAIL as string,
16-
smtpUsername: process.env.SMTP_USERNAME as string,
17-
smtpPassword: process.env.SMTP_PASSWORD as string,
13+
smtpHost: '',
14+
smtpPort: 0,
15+
smtpEmail: '',
16+
smtpUsername: '',
17+
smtpPassword: '',
1818
};
1919

2020
export function getDeliveryServiceProperties(

packages/lib/delivery/src/notifications/channels/Email.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { logError } from '@dm3-org/dm3-lib-shared';
33
import nodemailer from 'nodemailer';
44
import SMTPTransport from 'nodemailer/lib/smtp-transport';
55
import { NotificationType } from '../types';
6-
import { fetchEmailSubjectAndTemplate } from '../utils';
6+
import { fetchEmailSubjectAndTemplate } from '../getEmailTemplate';
77

88
// email server configuration
99
export type EmailNotificationServerConfig = {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// TODO: generates 5 digit OTP
2+
export const generateOtp = () => {
3+
return '12345';
4+
};

packages/lib/delivery/src/notifications/utils.ts packages/lib/delivery/src/notifications/getEmailTemplate.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ import {
55
NEW_MSG_EMAIL_TEMPLATE,
66
} from './templates/newMessage';
77
import { OTP_EMAIL_SUBJECT, OTP_EMAIL_TEMPLATE } from './templates/otp';
8-
9-
// TODO: generates 5 digit OTP
10-
export const generateOtp = () => {
11-
return '12345';
12-
};
8+
import { generateOtp } from './generateOtp';
139

1410
// to fetch subject & template of email based on notification type
1511
export const fetchEmailSubjectAndTemplate = (

0 commit comments

Comments
 (0)