Files
sign/packages/lib/server-only/user/get-user-by-id.ts

14 lines
252 B
TypeScript
Raw Normal View History

2023-06-09 18:21:18 +10:00
import { prisma } from '@documenso/prisma';
export interface GetUserByIdOptions {
id: number;
}
export const getUserById = async ({ id }: GetUserByIdOptions) => {
return await prisma.user.findFirstOrThrow({
where: {
id,
},
});
};