Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions lambda/waitlist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@ const resend = new Resend(process.env.RESEND_API_KEY);
const AUDIENCE_ID = process.env.RESEND_AUDIENCE_ID;

export const handler = async (event) => {
const headers = {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'POST, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type',
};

if (event.requestContext?.http?.method === 'OPTIONS') {
return { statusCode: 204, headers };
}
const headers = { 'Content-Type': 'application/json' };

if (event.requestContext?.http?.method !== 'POST') {
return { statusCode: 405, headers, body: JSON.stringify({ error: 'Method not allowed' }) };
Expand Down
Loading