10 lines
202 B
TypeScript
10 lines
202 B
TypeScript
|
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;
|
||
|
}
|
||
|
}
|