Skip to content

Commit

Permalink
fix: Limit bulk to 100k emails
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Dec 29, 2023
1 parent 0896939 commit f555d11
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/[lang]/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface DashboardProps {
export function Dashboard({
children,
d,
showApiUsage,
showApiUsage = true,
subscription,
tab,
}: DashboardProps) {
Expand Down
10 changes: 10 additions & 0 deletions src/app/api/v1/bulk/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ export const POST = async (req: NextRequest): Promise<Response> => {
}

const payload: BulkPayload = await req.json();
if (payload.input.length > 100000) {
return Response.json(
{
error: "Bulk verification is limited to 100_000 emails",
},
{
status: 403,
}
);
}

// Add to Supabase
const res1 = await supabaseAdmin
Expand Down

1 comment on commit f555d11

@vercel
Copy link

@vercel vercel bot commented on f555d11 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.