Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

878 forgot password feature #1914

Merged
merged 10 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#878-fixed config and logger message
  • Loading branch information
MartinJurcoGlina committed Jul 22, 2024
commit 6be4cbbe504173a2f98b45813d4225303ed86e87
6 changes: 3 additions & 3 deletions email-notification-service/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ const config: Config = {
host: process.env.DB_HOST || "localhost",
database: process.env.DB_NAME || "trubudget_email_service",
port: Number(process.env.DB_PORT) || 5432,
ssl: Boolean(process.env.DB_SSL) || false,
ssl: process.env.DB_SSL === "true",
schema: process.env.DB_SCHEMA || "public",
},
sqlDebug: Boolean(process.env.SQL_DEBUG) || false,
sqlDebug: process.env.SQL_DEBUG === "true",
userTable: process.env.USER_TABLE || "users",
smtpServer: {
host: process.env.SMTP_HOST || "localhost",
port: Number(process.env.SMTP_PORT) || 2500,
secure: Boolean(process.env.SMTP_SSL) || false,
secure: process.env.SMTP_SSL === "true",
user: process.env.SMTP_USER || "",
password: process.env.SMTP_PASSWORD || "",
},
Expand Down
13 changes: 1 addition & 12 deletions email-notification-service/src/sendMail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,7 @@ const sendMail = async (
},
};
try {
const transportOptionsForLog = { ...transportOptions };
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (transportOptionsForLog.auth && transportOptionsForLog.auth.pass) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
transportOptionsForLog.auth.pass = "*****";
}
logger.debug(
{ transportOptions: transportOptionsForLog },
"Sending email with transport options",
);
logger.debug({ transportOptions }, "Sending email with transport options");
const transporter = nodemailer.createTransport(transportOptions);
const info: SentMessageInfo = await transporter.sendMail({
from: config.email.from,
Expand Down