mirror of
https://github.com/harivansh-afk/Saas-Teamspace.git
synced 2026-04-15 08:03:45 +00:00
19 lines
381 B
TypeScript
19 lines
381 B
TypeScript
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
|
|
}
|
|
}
|