feat: auth
This commit is contained in:
parent
88c7d2e2c1
commit
16c730a69b
9 changed files with 477 additions and 121 deletions
10
lib/users.ts
Normal file
10
lib/users.ts
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue