Skip to content

Commit

Permalink
Merge pull request #17 from GDG-Lille/fix/webhook/payload
Browse files Browse the repository at this point in the history
fix(webhook): change payload with the partner id and its data.
  • Loading branch information
EmmanuelDemey committed Feb 20, 2024
2 parents af67cca + ce683b5 commit 44492a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/src/cms4devfest-gdg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
});
}
}
});

0 comments on commit 44492a7

Please sign in to comment.