aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-06-21 14:34:09 +0000
committerMohamed Bassem <me@mbassem.com>2025-06-21 14:34:48 +0000
commit04f93941ca4d10f09befb4d1b219899ecbe792b1 (patch)
tree652aeb2e0fa92674d77e104147195664f0e027c0 /packages/shared
parent0f4c616230f570b2323fbc473e6f857b36abd5ba (diff)
downloadkarakeep-04f93941ca4d10f09befb4d1b219899ecbe792b1.tar.zst
fix: Fix webhook not firing on deletion. Fixes #1613
Diffstat (limited to 'packages/shared')
-rw-r--r--packages/shared/queues.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/shared/queues.ts b/packages/shared/queues.ts
index a434414c..a2fdc6b4 100644
--- a/packages/shared/queues.ts
+++ b/packages/shared/queues.ts
@@ -173,6 +173,7 @@ export const AssetPreprocessingQueue =
export const zWebhookRequestSchema = z.object({
bookmarkId: z.string(),
operation: z.enum(["crawled", "created", "edited", "ai tagged", "deleted"]),
+ userId: z.string().optional(),
});
export type ZWebhookRequest = z.infer<typeof zWebhookRequestSchema>;
export const WebhookQueue = new SqliteQueue<ZWebhookRequest>(
@@ -189,9 +190,11 @@ export const WebhookQueue = new SqliteQueue<ZWebhookRequest>(
export async function triggerWebhook(
bookmarkId: string,
operation: ZWebhookRequest["operation"],
+ userId?: string,
) {
await WebhookQueue.enqueue({
bookmarkId,
+ userId,
operation,
});
}