or clause in finduser

This commit is contained in:
cirroskais 2024-04-23 07:58:13 -04:00
parent 33a88a0a33
commit 393312dba4
No known key found for this signature in database
GPG key ID: 36FBC361DF481862

View file

@ -14,7 +14,7 @@ export async function createUser(username, email, password) {
}
});
const settings = await prisma.userSettings.create({
await prisma.userSettings.create({
data: {
userId: user.id
}
@ -41,8 +41,7 @@ export async function findUser({ email, username }) {
const user = await prisma.user.findFirst({
where: {
email,
username
OR: [email, username]
}
});