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,17 @@
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,
},
});
};