We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f917c1 commit 3d3886dCopy full SHA for 3d3886d
src/routes/hooks.ts
@@ -17,13 +17,13 @@ export enum WebhookHandledStatus {
17
Error = "error",
18
};
19
20
-export const addWebhookToDB = async function(prisma: PrismaClient, webhookHeaders: WebhookHeaders, body: string): Promise<void> {
+export const addWebhookToDB = async function(prisma: PrismaClient, webhookHeaders: WebhookHeaders, body: any): Promise<void> {
21
await prisma.intraWebhook.create({
22
data: {
23
model: webhookHeaders.modelType,
24
event: webhookHeaders.eventType,
25
delivery_id: webhookHeaders.deliveryId,
26
- body: body,
+ body: JSON.stringify(body),
27
received_at: new Date(),
28
status: WebhookHandledStatus.Unhandled,
29
},
0 commit comments