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
+2 -2
View File
@@ -25,7 +25,7 @@ export default async function Index(
const checkIfUserExists = await prisma.user.findFirst({
where: {
email: body.email,
email: body.email.toLowerCase(),
},
});
@@ -37,7 +37,7 @@ export default async function Index(
await prisma.user.create({
data: {
name: body.name,
email: body.email,
email: body.email.toLowerCase(),
password: hashedPassword,
},
});