feat: delete webhook functionality

This commit is contained in:
Catalin Pit
2024-02-09 16:28:18 +02:00
parent ddb9dd11d7
commit 0209127136
6 changed files with 56 additions and 16 deletions

View File

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