Skip to content

Commit

Permalink
Disable admin-email mode and re-enable suspending accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcrammer committed May 14, 2024
1 parent 0b09405 commit d6002ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/routes/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/sendEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6002ac

Please sign in to comment.