From bb9bad6d90370e768d4baffaae23ec756cc8353b Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 4 Mar 2021 16:19:19 +0100 Subject: [PATCH] Now checking for mails being set ref #151 --- src/config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 3e2bf7f..08af1ac 100644 --- a/src/config.ts +++ b/src/config.ts @@ -14,8 +14,8 @@ export const config = { app_url: process.env.APP_URL || "http://localhost:8080", privacy_url: process.env.PRIVACY_URL || "/privacy", imprint_url: process.env.IMPRINT_URL || "/imprint", - mailer_url: process.env.MAILER_URL || "http://localhost:8080/mailer", - mailer_key: process.env.MAILER_KEY || "pleasesetme" + mailer_url: process.env.MAILER_URL || "", + mailer_key: process.env.MAILER_KEY || "" } let errors = 0 if (typeof config.internal_port !== "number") { @@ -24,6 +24,9 @@ if (typeof config.internal_port !== "number") { if (typeof config.development !== "boolean") { errors++ } +if (config.mailer_url == "" || config.mailer_key == "") { + errors++; +} function getPhoneCodeLocale(): CountryCode { return (process.env.PHONE_COUNTRYCODE as CountryCode); }