initial commit

This commit is contained in:
Harivansh Rathi 2024-11-24 20:56:03 -05:00
commit ef9ccf22d3
133 changed files with 20802 additions and 0 deletions

19
data/user.ts Normal file
View file

@ -0,0 +1,19 @@
import { db } from '@/lib/db'
export const getUserByEmail = async (email: string) => {
try {
const user = await db.user.findUnique({ where: { email } })
return user
} catch {
return null
}
}
export const getUserById = async (id: string) => {
try {
const user = await db.user.findUnique({ where: { id } })
return user
} catch {
return null
}
}