diff options
Diffstat (limited to 'packages/shared/queues.ts')
| -rw-r--r-- | packages/shared/queues.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/shared/queues.ts b/packages/shared/queues.ts index b0002a29..cbe58f8d 100644 --- a/packages/shared/queues.ts +++ b/packages/shared/queues.ts @@ -159,10 +159,10 @@ export const AssetPreprocessingQueue = }, ); -//Webhook worker +// Webhook worker export const zWebhookRequestSchema = z.object({ bookmarkId: z.string(), - operation: z.enum(["crawled"]), + operation: z.enum(["crawled", "created", "edited"]), }); export type ZWebhookRequest = z.infer<typeof zWebhookRequestSchema>; export const WebhookQueue = new SqliteQueue<ZWebhookRequest>( @@ -176,9 +176,9 @@ export const WebhookQueue = new SqliteQueue<ZWebhookRequest>( }, ); -export async function triggerWebhookWorker( +export async function triggerWebhook( bookmarkId: string, - operation: "crawled", + operation: ZWebhookRequest["operation"], ) { await WebhookQueue.enqueue({ bookmarkId, |
