export const getUserByClerkID = async (select = { id: true }) => {
const { userId } = auth();
const user = await prisma.user.findUniqueOrThrow({
where: {
clerkId: userId as string,
},
select,
});
return user;
};
export const getUserByClerkID = async (select = { id: true }) => {
const { userId } = auth();
const user = await prisma.user.findUniqueOrThrow({
where: {
clerkId: userId as string,
},
select,
});
return user;
};