mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
feat: more webhook functionality
This commit is contained in:
17
packages/lib/server-only/user/get-user-webhooks.ts
Normal file
17
packages/lib/server-only/user/get-user-webhooks.ts
Normal 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,
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user