feat: more webhook functionality

This commit is contained in:
Catalin Pit
2024-02-14 14:38:58 +02:00
parent 0209127136
commit 61958989b4
8 changed files with 287 additions and 14 deletions

View File

@ -0,0 +1,15 @@
import { prisma } from '@documenso/prisma';
export type GetWebhookByIdOptions = {
id: number;
userId: number;
};
export const getWebhookById = async ({ id, userId }: GetWebhookByIdOptions) => {
return await prisma.webhook.findFirstOrThrow({
where: {
id,
userId,
},
});
};