aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers/webhookWorker.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-04-27 00:02:20 +0100
committerGitHub <noreply@github.com>2025-04-27 00:02:20 +0100
commit136f126296af65f50da598d084d1485c0e40437a (patch)
tree2725c7932ebbcb9b48b5af98eb9b72329a400260 /apps/workers/webhookWorker.ts
parentca47be7fe7be128f459c37614a04902a873fe289 (diff)
downloadkarakeep-136f126296af65f50da598d084d1485c0e40437a.tar.zst
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
Diffstat (limited to 'apps/workers/webhookWorker.ts')
-rw-r--r--apps/workers/webhookWorker.ts13
1 files changed, 8 insertions, 5 deletions
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,
},