Skip to content

Commit

Permalink
Email functionality corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
matherg committed Nov 18, 2024
1 parent a95e616 commit 04b0bc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/router/user/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ const gmailEmailSchema = z
.email()
.refine(
(email) =>
process.env.NEXT_PUBLIC_ENV === "staging" &&
email.toLowerCase().endsWith("@gmail.com"),
(process.env.NEXT_PUBLIC_ENV === "staging" &&
email.toLowerCase().endsWith("@gmail.com")) ||
process.env.NEXT_PUBLIC_ENV !== "staging",
{
message:
"Only gmail.com email addresses are accepted in the staging environment",
Expand Down

0 comments on commit 04b0bc3

Please sign in to comment.