mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
wip: refresh design
This commit is contained in:
13
packages/lib/server-only/user/get-user-by-id.ts
Normal file
13
packages/lib/server-only/user/get-user-by-id.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export interface GetUserByIdOptions {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export const getUserById = async ({ id }: GetUserByIdOptions) => {
|
||||
return await prisma.user.findFirstOrThrow({
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user