oh
This commit is contained in:
parent
393312dba4
commit
3331779499
1 changed files with 3 additions and 2 deletions
|
@ -37,11 +37,12 @@ export async function createSession(userId, needsMfa = false) {
|
|||
}
|
||||
|
||||
export async function findUser({ email, username }) {
|
||||
if (!email || !username) return false;
|
||||
if (!email && !username) return false;
|
||||
|
||||
const user = await prisma.user.findFirst({
|
||||
where: {
|
||||
OR: [email, username]
|
||||
email,
|
||||
username
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue