diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-06-21 14:34:09 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-06-21 14:34:48 +0000 |
| commit | 04f93941ca4d10f09befb4d1b219899ecbe792b1 (patch) | |
| tree | 652aeb2e0fa92674d77e104147195664f0e027c0 /packages/shared | |
| parent | 0f4c616230f570b2323fbc473e6f857b36abd5ba (diff) | |
| download | karakeep-04f93941ca4d10f09befb4d1b219899ecbe792b1.tar.zst | |
fix: Fix webhook not firing on deletion. Fixes #1613
Diffstat (limited to 'packages/shared')
| -rw-r--r-- | packages/shared/queues.ts | 3 |
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, }); } |
