diff --git a/src/service/configuration/configuration.ts b/src/service/configuration/configuration.ts index afb10f52..c52759e6 100644 --- a/src/service/configuration/configuration.ts +++ b/src/service/configuration/configuration.ts @@ -39,7 +39,6 @@ export class Configuration { return this.configurations[option.name]; } const value = (option.envName in process.env && process.env[option.envName]) || defaultValue || option.default; - console.log(name, value, process.env[option.envName]) switch (option.type) { case "boolean": return value === "true" || value === true; diff --git a/src/service/mailer/mailer.ts b/src/service/mailer/mailer.ts index 581e777f..484ff16f 100644 --- a/src/service/mailer/mailer.ts +++ b/src/service/mailer/mailer.ts @@ -4,6 +4,7 @@ const log = Logger.getLogger().child({ from: "mailer" }); import sgMail from "@sendgrid/mail"; import nodemailer from "nodemailer"; import * as path from "path"; +import {fileURLToPath} from 'url'; import * as fs from "fs"; import { Configuration } from "../../singleton/configuration.js"; @@ -12,6 +13,9 @@ import VerificationCodeModel from "../../model/mongo/verification-code.js"; import { VerificationCodeType } from "../../enum/verification-code.js"; import { v4 as uuidv4 } from "uuid"; +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + const Modes = { PRINT: "print", SENDGRID: "sendgrid",