From ce683b572a21fcce756fa5aba41cb4265dec5493 Mon Sep 17 00:00:00 2001 From: Gerard Paligot Date: Tue, 20 Feb 2024 21:28:25 +0100 Subject: [PATCH] fix(webhook): change payload with the partner id and its data. --- functions/src/cms4devfest-gdg.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/src/cms4devfest-gdg.ts b/functions/src/cms4devfest-gdg.ts index d6216df..ffae2e0 100644 --- a/functions/src/cms4devfest-gdg.ts +++ b/functions/src/cms4devfest-gdg.ts @@ -18,7 +18,10 @@ export const onSendChangesToWebHooks = functions.firestore if (configurationFromFirestore.webhooks?.length! > 0) { for (let webhook of configurationFromFirestore.webhooks!) { console.log(`Sending to webhook ${webhook} information about ${changes.after.data().name}`); - await axios.post(webhook, changes.after); + await axios.post(webhook, { + id: changes.after.id, + data: changes.after.data() + }); } } });