Skip to content

Commit 19d1456

Browse files
committed
Disable email alerts
Sendgrid's free plan was discontinued, and I'm not sure these were ever working reliably anyway. Will hopefully return to these in the future.
1 parent 73e9db7 commit 19d1456

6 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/send-alerts.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# Email notifications temporarily disabled (Sendgrid free plan discontinued)
12
name: Send alerts cron job
23
on:
3-
schedule:
4-
- cron: 0 7 * * *
4+
# schedule:
5+
# - cron: 0 7 * * *
56
workflow_dispatch:
67
jobs:
78
cron:

pages/api/create-alert.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ const isFormData = (data: unknown): data is FormData => {
1717
}
1818

1919
const CreateAlert = async (req: NextApiRequest, res: NextApiResponse) => {
20+
// Email notifications temporarily disabled (Sendgrid free plan discontinued)
21+
return res.status(constants.HTTP_STATUS_SERVICE_UNAVAILABLE).json({ message: 'Email notifications are temporarily unavailable' });
22+
2023
const config = loadConfig();
2124

2225
if (req.method !== 'POST') {

pages/api/send-alerts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import sendAlerts from "lib/notifications/jobs/sendAlerts";
44
import loadConfig from "lib/notifications/helpers/loadConfig";
55

66
const SendAlerts = async (req: NextApiRequest, res: NextApiResponse) => {
7+
// Email notifications temporarily disabled (Sendgrid free plan discontinued)
8+
return res.status(constants.HTTP_STATUS_SERVICE_UNAVAILABLE).json({ message: 'Email notifications are temporarily unavailable' });
9+
710
if (req.method !== 'POST') {
811
return res
912
.status(constants.HTTP_STATUS_METHOD_NOT_ALLOWED)

pages/api/send-manage-link.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const isFormData = (data: unknown): data is FormData => {
1515
}
1616

1717
const SendManageLink = async (req: NextApiRequest, res: NextApiResponse) => {
18+
// Email notifications temporarily disabled (Sendgrid free plan discontinued)
19+
return res.status(constants.HTTP_STATUS_SERVICE_UNAVAILABLE).json({ message: 'Email notifications are temporarily unavailable' });
20+
1821
const config = loadConfig();
1922

2023
if (req.method !== 'POST') {

pages/api/send-verification-link.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const isFormData = (data: unknown): data is FormData => {
1515
}
1616

1717
const SendVerificationLink = async (req: NextApiRequest, res: NextApiResponse) => {
18+
// Email notifications temporarily disabled (Sendgrid free plan discontinued)
19+
return res.status(constants.HTTP_STATUS_SERVICE_UNAVAILABLE).json({ message: 'Email notifications are temporarily unavailable' });
20+
1821
const config = loadConfig();
1922

2023
if (req.method !== 'POST') {

pages/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import SearchFilters from "@components/SearchFilters";
66
import DentistsList from "@components/DentistsList";
77
import { DentistsProvider } from "@contexts/Dentists";
88
import { useReducer } from "react";
9-
import NotificationsCta from "@components/NotificationsCta";
9+
// TODO: Re-enable once email provider is set up (Sendgrid free plan discontinued)
10+
// import NotificationsCta from "@components/NotificationsCta";
1011
import { FiltersProvider } from "@contexts/Filters";
1112

1213
const DentistsMap = dynamic(() => import("@components/DentistsMap"), { ssr: false });
@@ -52,7 +53,7 @@ export default function Home({ initialLocation, initialRadius, showCells }) {
5253
</Section>
5354

5455
<SearchFilters />
55-
<NotificationsCta />
56+
{/* <NotificationsCta /> */}
5657
<DentistsList />
5758
</div>
5859
<Footer />

0 commit comments

Comments
 (0)