hermes-web/data/user.ts
2024-01-02 07:26:20 +00:00

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;
}
}