Skip to content

Commit

Permalink
Update login.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
quick007 committed Mar 14, 2024
1 parent cda1052 commit aeb10e5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions routes/api/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ export const handler: Handlers<{ email: string; otp: string }> = {

const allowedEmails = JSON.parse(Deno.env.get("ALLOWED_EMAILS") ?? "[]");

if (
!allowedEmails.includes(email) &&
Deno.env.get("DENO_DEPLOYMENT_ID") != undefined
) {
return new Response(
JSON.stringify({ error: "Your email isn't whitelisted" }),
{
status: 400,
},
);
}
// if (
// !allowedEmails.includes(email) &&
// Deno.env.get("DENO_DEPLOYMENT_ID") != undefined
// ) {
// return new Response(
// JSON.stringify({ error: "Your email isn't whitelisted" }),
// {
// status: 400,
// },
// );
// }

const otp = await generateOTP(email);

Expand Down

0 comments on commit aeb10e5

Please sign in to comment.