Refactoring 3

This commit is contained in:
Darren Clarke 2024-04-30 13:13:49 +02:00
parent e4b78ceec2
commit d1fb9b4d06
20 changed files with 201 additions and 123 deletions

View file

@ -17,9 +17,13 @@ const receiveFacebookMessageTask = async ({
.selectAll()
.where("pageId", "=", pageId)
.executeTakeFirstOrThrow();
const backendId = row.id;
const payload = {
text: messaging.message.text,
recipient: messaging.sender.id,
};
console.log({ row });
await worker.addJob("notify_webhooks", messaging);
await worker.addJob("common/notify-webhooks", { backendId, payload });
}
}
};