mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
22 lines
405 B
TypeScript
22 lines
405 B
TypeScript
import type { Prisma } from '@prisma/client';
|
|
|
|
import { prisma } from '@documenso/prisma';
|
|
|
|
export type EditWebhookOptions = {
|
|
id: number;
|
|
data: Prisma.WebhookUpdateInput;
|
|
userId: number;
|
|
};
|
|
|
|
export const editWebhook = async ({ id, data, userId }: EditWebhookOptions) => {
|
|
return await prisma.webhook.update({
|
|
where: {
|
|
id,
|
|
userId,
|
|
},
|
|
data: {
|
|
...data,
|
|
},
|
|
});
|
|
};
|