From d7882feaa51f60347cd6269870f1169ce26e159e Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Fri, 4 Feb 2022 00:04:18 -0600 Subject: [PATCH 1/2] :bug: import property from config --- pages/api/email-me.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/api/email-me.js b/pages/api/email-me.js index ac8042a..3b40c66 100644 --- a/pages/api/email-me.js +++ b/pages/api/email-me.js @@ -4,7 +4,7 @@ import fs from "fs"; import { getSession } from "next-auth/react"; import path from "path"; import { resolveSafeTypeToFilename } from "../../lib/node-utils"; -import PhundConfig from "../../phund.config"; +import { businessUserEmail } from "../../phund.config"; sgMail.setApiKey(process.env.EMAIL_API_KEY); function SplitFromEmailEnv(envVar) { @@ -22,7 +22,6 @@ export default async (req, res) => { return res.status(403).json({ error: "Not authorized" }); } const from = SplitFromEmailEnv(process.env.FROM_EMAIL); - const businessUserEmail = PhundConfig?.businessUserEmail; const notificationMessage = "The following user emailed themselves our SAFE note. You should probably follow up tiger. ;-)\n\n"; From c72b7bbee3d4e20eb46c86a6f46c94ac8316de3d Mon Sep 17 00:00:00 2001 From: "Jason R. Stevens, CFA" Date: Fri, 4 Feb 2022 00:09:46 -0600 Subject: [PATCH 2/2] :bug: remove and fix default export -> named export --- phund.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/phund.config.js b/phund.config.js index 278fdc8..2e6550f 100644 --- a/phund.config.js +++ b/phund.config.js @@ -1,3 +1 @@ -export default PhundConfig = { - businessUserEmail: "phil@tincre.com", -}; +export const businessUserEmail = "phil@tincre.com";