Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix comment

adilson64b8aad18a66
diff --git a/backend/src/services/webhook/webhook-service.ts b/backend/src/services/webhook/webhook-service.ts
index f23161313b..1f92606e7f 100644
--- a/backend/src/services/webhook/webhook-service.ts
+++ b/backend/src/services/webhook/webhook-service.ts
@@ -42,10 +42,9 @@ export const webhookServiceFactory = ({
}: TWebhookServiceFactoryDep) => {
const subscribableEvents = new Set<string>(SUBSCRIBABLE_WEBHOOK_EVENTS);
- // `eventsFilter` on the API mirrors the DB's `filteredEvents` column: both are the blocklist
- // of events that should NOT trigger the webhook. Empty array => no events are filtered out
- // (webhook fires on everything subscribable). Stale DB values that aren't in the current enum
- // (e.g. legacy empty strings) are dropped so the response stays valid against the zod schema.
+ // `eventsFilter` on the API mirrors the DB's `filteredEvents` column: both are the allowlist
+ // of events that should trigger the webhook. Empty array => no events are filtered out
+ // (webhook fires on everything subscribable).
const withEventsFilter = <T extends { filteredEvents?: string[] | null }>(webhook: T) => ({
...webhook,
eventsFilter: (webhook.filteredEvents ?? [])