From d6002ac21b8aa06293e0c7d688bc663a566fa242 Mon Sep 17 00:00:00 2001 From: davidcrammer Date: Mon, 13 May 2024 18:03:55 -0700 Subject: [PATCH] Disable admin-email mode and re-enable suspending accounts --- src/routes/cron.js | 2 +- src/utils/sendEmail.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/cron.js b/src/routes/cron.js index cc10553..87b6940 100644 --- a/src/routes/cron.js +++ b/src/routes/cron.js @@ -13,7 +13,7 @@ router.post("/", async (req, res) => { if (secret !== process.env.CRON_SECRET) throw new Error("Unauthorized") await subscriptionsCron() - // await suspendSubscriptionsCron() + await suspendSubscriptionsCron() res.json({ success: "success", message: "Cron job running" }) } catch (error) { diff --git a/src/utils/sendEmail.js b/src/utils/sendEmail.js index caec96c..d96ac79 100644 --- a/src/utils/sendEmail.js +++ b/src/utils/sendEmail.js @@ -18,9 +18,9 @@ export default async function sendEmail(msg) { template, } - // for testing, we will send all emails to the admin - msg.to = process.env.ADMIN_EMAIL - msg.bcc = null + // // for testing, we will send all emails to the admin + // msg.to = process.env.ADMIN_EMAIL + // msg.bcc = null try { if (process.env.SEND_EMAILS === "false") return console.info("Emails are disabled", to, from, subject, text, html)