From 136f126296af65f50da598d084d1485c0e40437a Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 27 Apr 2025 00:02:20 +0100 Subject: feat: Implement generic rule engine (#1318) * Add schema for the new rule engine * Add rule engine backend logic * Implement the worker logic and event firing * Implement the UI changesfor the rule engine * Ensure that when a referenced list or tag are deleted, the corresponding event/action is * Dont show smart lists in rule engine events * Add privacy validations for attached tag and list ids * Move the rules logic into a models --- apps/workers/webhookWorker.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'apps/workers/webhookWorker.ts') diff --git a/apps/workers/webhookWorker.ts b/apps/workers/webhookWorker.ts index fb8227e3..9d3ed2c1 100644 --- a/apps/workers/webhookWorker.ts +++ b/apps/workers/webhookWorker.ts @@ -47,14 +47,17 @@ export class WebhookWorker { } } -async function fetchBookmark(linkId: string) { +async function fetchBookmark(bookmarkId: string) { return await db.query.bookmarks.findFirst({ - where: eq(bookmarks.id, linkId), + where: eq(bookmarks.id, bookmarkId), with: { - link: true, - text: true, - asset: true, + link: { + columns: { + url: true, + }, + }, user: { + columns: {}, with: { webhooks: true, }, -- cgit v1.2.3-70-g09d2