mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
16 lines
302 B
TypeScript
16 lines
302 B
TypeScript
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,
|
|
},
|
|
});
|
|
};
|