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

18 lines
338 B
TypeScript
Raw Normal View History

2024-02-14 14:38:58 +02:00
import { prisma } from '@documenso/prisma';
export interface GetUserWebhooksByIdOptions {
id: number;
}
export const getUserWebhooksById = async ({ id }: GetUserWebhooksByIdOptions) => {
return await prisma.user.findFirstOrThrow({
where: {
id,
},
select: {
email: true,
Webhooks: true,
},
});
};