made the email field case-insensitive

This commit is contained in:
Daniel
2023-07-04 00:13:53 +03:30
parent ae1682ad55
commit ddc0675d2e
9 changed files with 19 additions and 15 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
import { toast } from "react-hot-toast";
export default async function getPublicUserDataByEmail(email: string) {
const response = await fetch(`/api/routes/users?email=${email}`);
const response = await fetch(
`/api/routes/users?email=${email.toLowerCase()}`
);
const data = await response.json();