Skip to content

Commit

Permalink
Attempt to fix the newsletter webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderson1993 committed Jun 3, 2024
1 parent f1bba25 commit d95aa34
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions app/routes/webhooks/newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import { emailSender } from "~/helpers/email";
import { db } from "~/helpers/prisma.server";
import { RateLimiter } from "limiter";
import { json } from "remix-utils";
import {
ActionFunction,
LoaderFunction,
redirect,
} from "@remix-run/server-runtime";
import type { ActionFunction } from "@remix-run/server-runtime";
const awsLimiter = new RateLimiter({ interval: "sec", tokensPerInterval: 70 });
export const action: ActionFunction = async ({ request }) => {
try {
Expand Down Expand Up @@ -113,12 +109,7 @@ export const action: ActionFunction = async ({ request }) => {
}
return json({ success: true }, { status: 200 });
} catch (err) {
console.error(err);
return json({ success: false }, { status: 400 });
}
};
export const loader: LoaderFunction = () => {
return redirect("/");
};
export default function Newsletter() {
return null;
}

0 comments on commit d95aa34

Please sign in to comment.