Upgraded to Next Auth v5
This commit is contained in:
10
data/user.ts
Normal file
10
data/user.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { db } from "@/lib/db";
|
||||
|
||||
export const getUserById = async (id: string) => {
|
||||
try {
|
||||
const user = await db.user.findUnique({ where: { id }})
|
||||
return user;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user