feat: auth

This commit is contained in:
Dex404 2024-04-22 03:45:44 +00:00
parent 88c7d2e2c1
commit 16c730a69b
9 changed files with 477 additions and 121 deletions

10
lib/users.ts Normal file
View file

@ -0,0 +1,10 @@
import { prisma } from "./prisma"
export async function getUserByEmail(email: string) {
try {
const user = await prisma.user.findUnique({ where: { email } })
return user
} catch {
return null
}
}